Spaces:
Running
on
Zero
Running
on
Zero
Commit
•
067f7c8
1
Parent(s):
7da187e
Update app.py
Browse files
app.py
CHANGED
@@ -50,10 +50,11 @@ if torch.cuda.is_available():
|
|
50 |
output = previewer(latents)
|
51 |
output = numpy_to_pil(output.clamp(0, 1).permute(0, 2, 3, 1).cpu().numpy())
|
52 |
return output
|
53 |
-
|
54 |
else:
|
55 |
previewer = None
|
56 |
callback_prior = None
|
|
|
57 |
else:
|
58 |
prior_pipeline = None
|
59 |
decoder_pipeline = None
|
@@ -94,6 +95,7 @@ def generate(
|
|
94 |
num_images_per_prompt=num_images_per_prompt,
|
95 |
generator=generator,
|
96 |
callback=callback_prior,
|
|
|
97 |
)
|
98 |
|
99 |
if PREVIEW_IMAGES:
|
|
|
50 |
output = previewer(latents)
|
51 |
output = numpy_to_pil(output.clamp(0, 1).permute(0, 2, 3, 1).cpu().numpy())
|
52 |
return output
|
53 |
+
callback_steps = 1
|
54 |
else:
|
55 |
previewer = None
|
56 |
callback_prior = None
|
57 |
+
callback_steps = None
|
58 |
else:
|
59 |
prior_pipeline = None
|
60 |
decoder_pipeline = None
|
|
|
95 |
num_images_per_prompt=num_images_per_prompt,
|
96 |
generator=generator,
|
97 |
callback=callback_prior,
|
98 |
+
callback_steps=callback_steps
|
99 |
)
|
100 |
|
101 |
if PREVIEW_IMAGES:
|