HighCWu / control-lora-v3

ControlLoRA Version 3: LoRA Is All You Need to Control the Spatial Information of Stable Diffusion.
MIT License
41 stars 0 forks source link

tracker_project_name error in train.py (sd-base) #5

Closed jessie-chen99 closed 1 week ago

jessie-chen99 commented 1 week ago

Hi thanks for your project. But when I tried to run train.py following readme, an error occured. I am using default args.tracker_project_name so I am confused. Could you please help me solve this? Thanks a lot! image

image

HighCWu commented 1 week ago

I'm sorry that I'm not sure what's going on with this. My code is basically modified from diffusers/examples/controlnet/train_controlnet.py. I suspect it may be a version problem of accelerator. You can try to run the official example of diffusersto see if the same issue occurs.

jessie-chen99 commented 1 week ago

Thanks, I run the official example of diffusers/examples/controlnet/train_controlnet.py with same commands and it works well. Should I change my accelerator config when training your lora project? My accelerate version is 0.34.2 and config is like this now. image

HighCWu commented 1 week ago

I checked it carefully, it may be because you use tensorboard, I have not used tensorboard before. tensorboard cannot handle list types for config. I added two lists in args in my code. Now you can add the following code above the error, which may solve the problem.

    tracker_config.pop("extra_lora_rank_modules")
    tracker_config.pop("extra_lora_ranks")

If the problem persists, try using wandb instead of tensorboard.

jessie-chen99 commented 1 week ago

Thank you!! The issue was indeed due to args.report_to using default setting tensorbroad. And both of the solutions you mentioned are effective.👍