RanM commited on
Commit
97d1a98
·
verified ·
1 Parent(s): 216a041

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -10,8 +10,8 @@ model = AutoPipelineForText2Image.from_pretrained("stabilityai/sdxl-turbo")
10
 
11
  async def generate_image(prompt):
12
  try:
13
- # Use a sensible default for num_inference_steps
14
- num_inference_steps = 1 # Adjust this value as needed
15
 
16
  # Use the model to generate an image
17
  output = await asyncio.to_thread(
 
10
 
11
  async def generate_image(prompt):
12
  try:
13
+ # Use a higher value for num_inference_steps to avoid IndexError
14
+ num_inference_steps = 10 # Adjust this value as needed
15
 
16
  # Use the model to generate an image
17
  output = await asyncio.to_thread(