lllyasviel / lllyasviel/ControlNet

"ValueError: ControlNet needs to be passed if loading from ControlNet pipeline." - even though list of ControlNets are passed

Open
#512 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
34.1k
Forks
3k
PR merge metrics
No merged PRs in 30d

Description

`ValueError: ControlNet needs to be passed if loading from ControlNet pipeline.`

The above error only occurs when trying to pass multiple controlnets as a list to `StableDiffusionControlNetPipeline.from_single_file` like so:

```python
pipe = StableDiffusionControlNetPipeline.from_single_file(
"./model.safetensors",
controlnet=[cn_openpose, cn_canny]
```

A single controlnet works as expected

[Reproduction notebook link](https://colab.research.google.com/drive/1CnevTpaMBv-DbFlMhyjc0yjkxaX_238a?usp=sharing)

![image](https://github.com/lllyasviel/ControlNet/assets/14341953/c8f5d4c0-ee3e-4337-b2a5-85ac8d9c3aa7)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at StableDiffusionControlNetPipeline.from_single_file and reproduce the failure with the linked Colab notebook using a list of two ControlNets. Trace why the list is rejected, then verify that multiple ControlNets load successfully while the existing single-ControlNet case still works.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.