RanM commited on
Commit
89a9597
·
verified ·
1 Parent(s): 54b597c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
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=1, # Set to a more reasonable default for inference steps
25
- guidance_scale=0.0, # Adjust guidance scale for better image quality
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