lllyasviel / lllyasviel/ControlNet

Explanation of the code "cldm/cldm.py": ControlledUnetModel class

Open
#170 0 comments 1 reaction 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

Thank you for amazing works first.

I have read your paper and have been looking at the implementation, especially the cldm.py
There's one thing I failed to understand that is (I assume) not specified on the paper.

In the ControlledUnetModel class, in the middle of the code definition, there is

if control is not None:
h += control.pop()

So, If a control tensor is provided, it adds it to the output of the middle block?
control must mean, for example, edge map feature maps.
But why is it added to the output of the middle block?

Thank you.

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 with cldm/cldm.py, focusing on the ControlledUnetModel class and the control.pop() use, then compare it with the paper referenced in the issue. Done means providing a clear explanation of the control tensor and why it is combined at that point in the model.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.