aigc-apps / aigc-apps/VideoX-Fun
Error when trying to merge a lora into pipeline with wan2.1_fun/predict_v2v_control.py
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.3k
- Forks
- 188
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 3
Description
.....
Enable TeaCache with threshold 0.09 and skip the first 5 steps.
Error loading layer
[rank1]: Traceback (most recent call last):
[rank1]: File "/mnt/sat/ai/VideoX-Fun/videox_fun/utils/lora_utils.py", line 399, in merge_lora
[rank1]: curr_layer = curr_layer.getattr("_".join(layer_infos[1:]))
[rank1]: File "/mnt/sat/ai/ComfyUI/comfyui-venv/lib/python3.10/site-packages/diffusers/models/modeling_utils.py", line 173, in getattr
[rank1]: return super().getattr(name)
[rank1]: File "/mnt/sat/ai/ComfyUI/comfyui-venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1928, in getattr
[rank1]: raise AttributeError(
[rank1]: AttributeError: 'WanTransformer3DModel' object has no attribute 'model'
[rank1]: During handling of the above exception, another exception occurred:
[rank1]: Traceback (most recent call last):
[rank1]: File "/mnt/sat/ai/VideoX-Fun/videox_fun/utils/lora_utils.py", line 404, in merge_lora
[rank1]: curr_layer = curr_layer.getattr(temp_name + "" + "".join(layer_infos))
[rank1]: File "/mnt/sat/ai/ComfyUI/comfyui-venv/lib/python3.10/site-packages/diffusers/models/modeling_utils.py", line 173, in getattr
[rank1]: return super().getattr(name)
[rank1]: File "/mnt/sat/ai/ComfyUI/comfyui-venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1928, in getattr
[rank1]: raise AttributeError(
[rank1]: AttributeError: 'WanTransformer3DModel' object has no attribute 'diffusion_model_'
[rank1]: During handling of the above exception, another exception occurred:
[rank1]: Traceback (most recent call last):
[rank1]: File "/mnt/sat/ai/VideoX-Fun/videox_fun/utils/lora_utils.py", line 408, in merge_lora
[rank1]: curr_layer = curr_layer.getattr(temp_name)
[rank1]: File "/mnt/sat/ai/ComfyUI/comfyui-venv/lib/python3.10/site-packages/diffusers/models/modeling_utils.py", line 173, in getattr
[rank1]: return super().getattr(name)
[rank1]: File "/mnt/sat/ai/ComfyUI/comfyui-venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1928, in getattr
[rank1]: raise AttributeError(
[rank1]: AttributeError: 'WanTransformer3DModel' object has no attribute 'diffusion_model'
[rank1]: During handling of the above exception, another exception occurred:
[rank1]: Traceback (most recent call last):
[rank1]: File "/mnt/sat/ai/VideoX-Fun/examples/wan2.1_fun/predict_v2v_control.py", line 243, in
[rank1]: pipeline = merge_lora(pipeline, lora_path, lora_weight)
[rank1]: File "/mnt/sat/ai/VideoX-Fun/videox_fun/utils/lora_utils.py", line 417, in merge_lora
[rank1]: temp_name += "_" + layer_infos.pop(0)
[rank1]: IndexError: pop from empty list
.....
script crash when I added a lora with lora_path.
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/wan2.1_fun/predict_v2v_control.py and videox_fun/utils/lora_utils.py, especially merge_lora around lines 399-417. Reproduce the crash with lora_path and the reported WanTransformer3DModel traceback, then compare the loaded layer names with the model attributes. Done means the script merges the LoRA without crashing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100