Skip to content

AttributeError: 'list' object has no attribute '__module__' :hunyuan dit cannot load multiple controlnets #9142

Closed

Description

@chuck-ma

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.

image

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?

@sayakpaul @yiyixuxu @DN6

Activity

  1. sayakpaul commented on Aug 9, 2024

    @sayakpaul
    Member
  2. github-actions commented on Sep 14, 2024

    @github-actions
    Contributor

    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.

  3. removed
    staleIssues that haven't received updates
    on Oct 31, 2024
  4. a-r-r-o-w commented on Oct 31, 2024

    @a-r-r-o-w
    Contributor

    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.

  5. yuanjua commented on May 15, 2025

    @yuanjua
    Contributor

    The issue appears to be resolved now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions