Skip to content

Commit c479eba

Browse files
committed
ruff fixes
1 parent cdaff4d commit c479eba

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

scripts/img2imgalt.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import k_diffusion as K
1313

1414
# Debugging notes - the original method apply_model is being called for sd1.5 is in modules.sd_hijack_utils and is ldm.models.diffusion.ddpm.LatentDiffusion
15-
# For sdxl - OpenAIWrapper will be called, which will call the underlying diffusion_model
15+
# For sdxl - OpenAIWrapper will be called, which will call the underlying diffusion_model
1616

1717

1818
def find_noise_for_image(p, cond, uncond, cfg_scale, steps):
@@ -47,9 +47,9 @@ def find_noise_for_image(p, cond, uncond, cfg_scale, steps):
4747

4848
c_out, c_in = [K.utils.append_dims(k, x_in.ndim) for k in dnw.get_scalings(sigma_in)[skip:]]
4949
t = dnw.sigma_to_t(sigma_in)
50-
50+
5151
if shared.sd_model.is_sdxl:
52-
eps = shared.sd_model.model(x_in * c_in, t, {"crossattn": cond_in["c_crossattn"][0]} )
52+
eps = shared.sd_model.model(x_in * c_in, t, {"crossattn": cond_in["c_crossattn"][0]} )
5353
else:
5454
eps = shared.sd_model.apply_model(x_in * c_in, t, cond=cond_in)
5555

@@ -104,7 +104,7 @@ def find_noise_for_image_sigma_adjustment(p, cond, uncond, cfg_scale, steps):
104104
x_in = torch.cat([x] * 2)
105105
sigma_in = torch.cat([sigmas[i - 1] * s_in] * 2)
106106

107-
107+
108108
if shared.sd_model.is_sdxl:
109109
cond_tensor = cond['crossattn']
110110
uncond_tensor = uncond['crossattn']
@@ -122,9 +122,9 @@ def find_noise_for_image_sigma_adjustment(p, cond, uncond, cfg_scale, steps):
122122
else:
123123
t = dnw.sigma_to_t(sigma_in)
124124

125-
125+
126126
if shared.sd_model.is_sdxl:
127-
eps = shared.sd_model.model(x_in * c_in, t, {"crossattn": cond_in["c_crossattn"][0]} )
127+
eps = shared.sd_model.model(x_in * c_in, t, {"crossattn": cond_in["c_crossattn"][0]} )
128128
else:
129129
eps = shared.sd_model.apply_model(x_in * c_in, t, cond=cond_in)
130130

0 commit comments

Comments
 (0)