update
Browse files
app.py
CHANGED
@@ -89,10 +89,6 @@ class CompVisDenoiser(K.external.CompVisDenoiser):
|
|
89 |
|
90 |
def to_d(x, sigma, denoised):
|
91 |
"""Converts a denoiser output to a Karras ODE derivative."""
|
92 |
-
|
93 |
-
print(x.device)
|
94 |
-
print(denoised.device)
|
95 |
-
print(sigma.device)
|
96 |
return (x - denoised) / append_dims(sigma, x.ndim)
|
97 |
|
98 |
def default_noise_sampler(x):
|
@@ -188,7 +184,6 @@ def generate(
|
|
188 |
return [input_image, seed]
|
189 |
|
190 |
model.cuda()
|
191 |
-
print("model.device:", model.device)
|
192 |
with torch.no_grad(), autocast("cuda"), model.ema_scope():
|
193 |
cond = {}
|
194 |
cond["c_crossattn"] = [model.get_learned_conditioning([instruction]).to(model.device)]
|
@@ -201,7 +196,7 @@ def generate(
|
|
201 |
uncond["c_concat"] = [torch.zeros_like(cond["c_concat"][0])]
|
202 |
|
203 |
|
204 |
-
sigmas = model_wrap.get_sigmas(steps)
|
205 |
|
206 |
extra_args = {
|
207 |
"cond": cond,
|
|
|
89 |
|
90 |
def to_d(x, sigma, denoised):
|
91 |
"""Converts a denoiser output to a Karras ODE derivative."""
|
|
|
|
|
|
|
|
|
92 |
return (x - denoised) / append_dims(sigma, x.ndim)
|
93 |
|
94 |
def default_noise_sampler(x):
|
|
|
184 |
return [input_image, seed]
|
185 |
|
186 |
model.cuda()
|
|
|
187 |
with torch.no_grad(), autocast("cuda"), model.ema_scope():
|
188 |
cond = {}
|
189 |
cond["c_crossattn"] = [model.get_learned_conditioning([instruction]).to(model.device)]
|
|
|
196 |
uncond["c_concat"] = [torch.zeros_like(cond["c_concat"][0])]
|
197 |
|
198 |
|
199 |
+
sigmas = model_wrap.get_sigmas(steps).to(model.device)
|
200 |
|
201 |
extra_args = {
|
202 |
"cond": cond,
|