Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -3,14 +3,14 @@ import asyncio
|
|
3 |
from concurrent.futures import ProcessPoolExecutor
|
4 |
from io import BytesIO
|
5 |
from PIL import Image
|
6 |
-
from diffusers import
|
7 |
import gradio as gr
|
8 |
from generate_prompts import generate_prompt
|
9 |
|
10 |
# Load the model once at the start
|
11 |
print("Loading the Stable Diffusion model...")
|
12 |
try:
|
13 |
-
model =
|
14 |
print("Model loaded successfully.")
|
15 |
except Exception as e:
|
16 |
print(f"Error loading model: {e}")
|
|
|
3 |
from concurrent.futures import ProcessPoolExecutor
|
4 |
from io import BytesIO
|
5 |
from PIL import Image
|
6 |
+
from diffusers import DiffusionPipeline, AutoPipelineForText2Image
|
7 |
import gradio as gr
|
8 |
from generate_prompts import generate_prompt
|
9 |
|
10 |
# Load the model once at the start
|
11 |
print("Loading the Stable Diffusion model...")
|
12 |
try:
|
13 |
+
model = AutoPipelineForText2Image.from_pretrained("stabilityai/sdxl-turbo")
|
14 |
print("Model loaded successfully.")
|
15 |
except Exception as e:
|
16 |
print(f"Error loading model: {e}")
|