RanM commited on
Commit
0cdadc9
·
verified ·
1 Parent(s): 754c202

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,10 +1,10 @@
1
  import asyncio
2
  import json
3
  import gradio as gr
4
- from diffusers import StableDiffusionPipeline
5
  from generate_propmts import generate_prompt
6
 
7
- # Load the model pipeline
8
  model = AutoPipelineForText2Image.from_pretrained("stabilityai/sdxl-turbo")
9
 
10
  async def generate_image(prompt, prompt_name):
 
1
  import asyncio
2
  import json
3
  import gradio as gr
4
+ from diffusers import AutoPipelineForText2Image
5
  from generate_propmts import generate_prompt
6
 
7
+ # Load the model once outside of the function
8
  model = AutoPipelineForText2Image.from_pretrained("stabilityai/sdxl-turbo")
9
 
10
  async def generate_image(prompt, prompt_name):