AttributeError: 'list' object has no attribute '__module__' :hunyuan dit cannot load multiple controlnets #9142
Copy link
Copy link
Closed
Labels
Description
Describe the bug
Can not use multiple controlnets, https://huggingface.co/docs/diffusers/main/en/api/pipelines/controlnet_hunyuandit. According to the docs above, it seems that I just need to use a list of controlnets to init the pipeline.
Reproduction
from diffusers import HunyuanDiT2DControlNetModel, HunyuanDiTControlNetPipeline, HunyuanDiT2DModel
import torch
model_id = "Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers-Distilled"
depth_controlnet = HunyuanDiT2DControlNetModel.from_pretrained("Tencent-Hunyuan/HunyuanDiT-v1.2-ControlNet-Diffusers-Depth",
torch_dtype=torch.float16)
controlnets = [
depth_controlnet, depth_controlnet
]
hunyuan_inpaint_pipe = HunyuanDiTControlNetPipeline.from_pretrained(model_id,
controlnet=controlnets,
torch_dtype=torch.float16)Logs
No response
System Info
- 🤗 Diffusers version: 0.30.0.dev0
- Platform: Linux-5.15.0-78-generic-x86_64-with-glibc2.35
- Running on Google Colab?: No
- Python version: 3.10.13
- PyTorch version (GPU?): 2.3.0+cu121 (True)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Huggingface_hub version: 0.23.4
- Transformers version: 4.41.2
- Accelerate version: 0.29.2
- PEFT version: 0.10.0
- Bitsandbytes version: 0.43.1
- Safetensors version: 0.4.3
- xFormers version: 0.0.26.post1
- Accelerator: NVIDIA GeForce RTX 4090, 24564 MiB
Who can help?
Reactions are currently unavailable
Activity
sayakpaul commentedon Aug 9, 2024
Cc: @gnobitab
github-actions commentedon Sep 14, 2024
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.
Please note that issues that do not follow the contributing guidelines are likely to be ignored.
a-r-r-o-w commentedon Oct 31, 2024
Thanks for reporting, and sorry for the delay in responding! Is this still an issue btw? I think it is since I can't find any relevant PRs. Opening it for community contributions, but if not completed soon, I'll fix it asap.
yuanjua commentedon May 15, 2025
The issue appears to be resolved now.