lllyasviel / ControlNet

Let us control diffusion models!
Apache License 2.0
29.93k stars 2.7k forks source link

Question about Figure 3 in the paper #648

Open yuxineverforever opened 7 months ago

yuxineverforever commented 7 months ago

Hi authors, I have a small question about the following piece of code and Figure 3.

1.        for module, zero_conv in zip(self.input_blocks, self.zero_convs):
2.            if guided_hint is not None:
3.                h = module(h, emb, context)
4.                h += guided_hint
5.                guided_hint = None

If I understand correctly, h should be the input z_t in Figure 3, guided_hint should be condition c_f in Figure 3.

Why we feed h through module and then add with guided_hint (Line 3-4)? According to Figure 3, shouldn't we add h with guided_hint directly? (Line 5)

Thank you for answering!

yuxineverforever commented 7 months ago

Could anyone help with this question? @scarbain @williamyang1991 @lllyasviel @eltociear

Thank you!

Chen-Suyi commented 6 months ago

I am trying to implement my own ControlNet, and I have the same question.