lllyasviel / lllyasviel/ControlNet
Explanation of the code "cldm/cldm.py": ControlledUnetModel class
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
- 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 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