modelscope / modelscope/DiffSynth-Studio
不知道为什么同时训练controlnet 和 lora ,controlnet 权重无法被保存?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 13.1k
- Forks
- 1.3k
- Avg merge
- 13h 12m
- Merged PRs (30d)
- 45
Description
accelerate launch examples/qwen_image/model_training/train.py \ --dataset_base_path "prepared_data_original" \ --dataset_metadata_path "prepared_data_original/metadata.json" \ --data_file_keys "image,edit_image,blockwise_controlnet_image,blockwise_controlnet_inpaint_mask" \ --height 1024 --width 1024 \ --dataset_repeat 1 \ --model_id_with_origin_paths "Qwen/Qwen-Image-Edit-2509:transformer/diffusion_pytorch_model*.safetensors,Qwen/Qwen-Image:text_encoder/model*.safetensors,Qwen/Qwen-Image:vae/diffusion_pytorch_model.safetensors,DiffSynth-Studio/Qwen-Image-Blockwise-ControlNet-Inpaint:model.safetensors" \ --learning_rate 1e-4 \ --num_epochs 5 \ --save_steps 10 \ --trainable_models "blockwise_controlnet" \ --output_path "train/Qwen-Image-Edit-2509_inpaint_controlnet_and_lora" \ --lora_base_model "dit" \ --lora_target_modules "to_q,to_k,to_v,add_q_proj,add_k_proj,add_v_proj,to_out.0,to_add_out,img_mlp.net.2,img_mod.1,txt_mlp.net.2,txt_mod.1" \ --lora_rank 128 \ --extra_inputs "blockwise_controlnet_image,blockwise_controlnet_inpaint_mask,edit_image" \ --find_unused_parameters \ --dataset_num_workers 2 \ --use_gradient_checkpointing \ --gradient_accumulation_steps 1 \ --wandb_project "qwen-image-inpaint" \ --wandb_name "lora-rank128-lr1e4"
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with examples/qwen_image/model_training/train.py and reproduce the supplied accelerate command, focusing on how trainable_models and LoRA parameters are saved. Trace the save output to determine why the ControlNet weights are missing; done when a run saving both components is demonstrated or the missing-save condition is isolated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100