mirror of
https://github.com/lllyasviel/stable-diffusion-webui-forge.git
synced 2026-02-01 22:09:46 +00:00
Update preprocessor_revision.py
This commit is contained in:
@@ -41,14 +41,14 @@ def revision_conditioning_modifier(model, x, timestep, uncond, cond, cond_scale,
|
||||
uncond = copy.deepcopy(uncond)
|
||||
|
||||
for c in cond:
|
||||
a = 0
|
||||
c['model_conds']['y'].cond[:, :1280] = new_y.clone()
|
||||
|
||||
for c in uncond:
|
||||
a = 0
|
||||
c['model_conds']['y'].cond[:, :1280] = torch.zeros_like(new_y)
|
||||
|
||||
if ignore_prompt:
|
||||
for c in cond + uncond:
|
||||
a = 0
|
||||
c['model_conds']['c_crossattn'].cond = torch.zeros_like(c['model_conds']['c_crossattn'].cond)
|
||||
|
||||
return model, x, timestep, uncond, cond, cond_scale, model_options, seed
|
||||
|
||||
|
||||
Reference in New Issue
Block a user