lllyasviel / lllyasviel/ControlNet

Why my controlnet output = 0?

Open
#540 0 comments 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

Hi, I am training a new network based on Controlnet with FFHQ dataset. But when i was checking my code, I find that the output of 'guided_hint = self.input_hint_block(hint, emb, context)' equals 0. I will be grateful if you can give me some advice.

The result is from:

self.input_hint_block = TimestepEmbedSequential(
conv_nd(dims, hint_channels, 16, 3, padding=1),
nn.SiLU(),
conv_nd(dims, 16, 16, 3, padding=1),
nn.SiLU(),
conv_nd(dims, 16, 32, 3, padding=1, stride=2),
nn.SiLU(),
conv_nd(dims, 32, 32, 3, padding=1),
nn.SiLU(),
conv_nd(dims, 32, 96, 3, padding=1, stride=2),
nn.SiLU(),
conv_nd(dims, 96, 96, 3, padding=1),
nn.SiLU(),
conv_nd(dims, 96, 256, 3, padding=1, stride=1),
nn.SiLU(),
zero_module(conv_nd(dims, 256, model_channels, 3, padding=1))
)

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 by tracing the input_hint_block definition and the zero_module call shown in the issue, then inspect how guided_hint is produced during ControlNet training. Compare the tensor values before and after this block and determine whether the zero output is expected initialization or a defect; done means identifying the cause and documenting the required change or usage.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.