mirror of
https://github.com/lllyasviel/Fooocus.git
synced 2026-08-16 13:13:16 +02:00
improve result quality of control (#581)
This commit is contained in:
+3
-3
@@ -372,10 +372,10 @@ def patched_cldm_forward(self, x, hint, timesteps, context, y=None, **kwargs):
|
||||
h = self.middle_block(h, emb, context)
|
||||
outs.append(self.middle_block_out(h, emb, context))
|
||||
|
||||
if not advanced_parameters.disable_soft_cn:
|
||||
if advanced_parameters.controlnet_softness > 0:
|
||||
for i in range(10):
|
||||
k = float(i) / 9.0
|
||||
outs[i] = outs[i] * (0.1 + 0.9 * k)
|
||||
k = 1.0 - float(i) / 9.0
|
||||
outs[i] = outs[i] * (1.0 - advanced_parameters.controlnet_softness * k)
|
||||
|
||||
return outs
|
||||
|
||||
|
||||
Reference in New Issue
Block a user