mirror of
https://github.com/lllyasviel/stable-diffusion-webui-forge.git
synced 2026-04-27 09:41:31 +00:00
i
This commit is contained in:
@@ -72,6 +72,7 @@ def compute_controlnet_weighting(
|
|||||||
return control
|
return control
|
||||||
|
|
||||||
cond_or_uncond = transformer_options['cond_or_uncond']
|
cond_or_uncond = transformer_options['cond_or_uncond']
|
||||||
|
cond_or_uncond_size = transformer_options['cond_or_uncond_size']
|
||||||
sigmas = transformer_options['sigmas']
|
sigmas = transformer_options['sigmas']
|
||||||
|
|
||||||
if advanced_sigma_weighting is not None:
|
if advanced_sigma_weighting is not None:
|
||||||
|
|||||||
@@ -129,6 +129,7 @@ def patched_calc_cond_uncond_batch(model, cond, uncond, x_in, timestep, model_op
|
|||||||
patches = p.patches
|
patches = p.patches
|
||||||
|
|
||||||
batch_chunks = len(cond_or_uncond)
|
batch_chunks = len(cond_or_uncond)
|
||||||
|
cond_or_uncond_size = int(timestep.shape[0])
|
||||||
input_x = torch.cat(input_x)
|
input_x = torch.cat(input_x)
|
||||||
c = cond_cat(c)
|
c = cond_cat(c)
|
||||||
timestep_ = torch.cat([timestep] * batch_chunks)
|
timestep_ = torch.cat([timestep] * batch_chunks)
|
||||||
@@ -150,6 +151,7 @@ def patched_calc_cond_uncond_batch(model, cond, uncond, x_in, timestep, model_op
|
|||||||
|
|
||||||
transformer_options["cond_or_uncond"] = cond_or_uncond[:]
|
transformer_options["cond_or_uncond"] = cond_or_uncond[:]
|
||||||
transformer_options["sigmas"] = timestep
|
transformer_options["sigmas"] = timestep
|
||||||
|
transformer_options["cond_or_uncond_size"] = cond_or_uncond_size
|
||||||
|
|
||||||
c['transformer_options'] = transformer_options
|
c['transformer_options'] = transformer_options
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user