lllyasviel / lllyasviel/ControlNet

question about model.control_scale

Open
#185 2 comments 2 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

Hi! Thank you so much for your great work!
I have a question related to the control strength when using gradio.
This may related to model.control_scales, in
[`model.control_scales = [strength * (0.825 ** float(12 - i)) for i in range(13)] if guess_mode else ([strength] * 13) # Magic number. IDK why. Perhaps because 0.825**12<0.01 but 0.826**12>0.01`](https://github.com/lllyasviel/ControlNet/blob/main/gradio_depth2image.py#L54)

May I know what's the meaning of the model.control_scales and the usage of control strength?
Thank you so much in advance!

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 gradio_depth2image.py around line 54 and trace where model.control_scales is read during inference. Read the surrounding ControlNet model code to identify how the scales affect control strength, then document the meaning of the values and the difference between normal and guess mode.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation, machine-learning
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.