Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -18,11 +18,14 @@ def generate_image(prompt):
|
|
18 |
if not hasattr(scheduler_step_storage, 'step'):
|
19 |
scheduler_step_storage.step = 0
|
20 |
|
|
|
|
|
|
|
21 |
# Use the thread-local step index
|
22 |
output = model(
|
23 |
prompt=prompt,
|
24 |
-
num_inference_steps=
|
25 |
-
guidance_scale=0.0, #
|
26 |
output_type="pil" # Directly get PIL Image objects
|
27 |
)
|
28 |
|
|
|
18 |
if not hasattr(scheduler_step_storage, 'step'):
|
19 |
scheduler_step_storage.step = 0
|
20 |
|
21 |
+
# Use a sensible default for num_inference_steps
|
22 |
+
num_inference_steps = 1 # Adjust this value as needed
|
23 |
+
|
24 |
# Use the thread-local step index
|
25 |
output = model(
|
26 |
prompt=prompt,
|
27 |
+
num_inference_steps=num_inference_steps, # Use a higher value for inference steps
|
28 |
+
guidance_scale=0.0, # Typical value for guidance scale in image generation
|
29 |
output_type="pil" # Directly get PIL Image objects
|
30 |
)
|
31 |
|