Spaces:
Runtime error
Runtime error
Commit
·
0a8dd47
1
Parent(s):
bb8dc39
Update app.py
Browse files
app.py
CHANGED
@@ -6,13 +6,13 @@ from diffusers import StableDiffusionXLPipeline
|
|
6 |
pipe = StableDiffusionXLPipeline.from_pretrained(
|
7 |
"stabilityai/stable-diffusion-xl-base-1.0", torch_dtype=torch.float16
|
8 |
)
|
9 |
-
pipe = pipe.to("
|
10 |
|
11 |
# Create a Streamlit app
|
12 |
-
st.title("
|
13 |
|
14 |
# Add a text input for the prompt
|
15 |
-
prompt = st.text_input("Prompt"
|
16 |
|
17 |
# Generate the image based on the prompt
|
18 |
if st.button("Generate Image"):
|
|
|
6 |
pipe = StableDiffusionXLPipeline.from_pretrained(
|
7 |
"stabilityai/stable-diffusion-xl-base-1.0", torch_dtype=torch.float16
|
8 |
)
|
9 |
+
pipe = pipe.to("cpu") # Move the model to GPU for faster processing
|
10 |
|
11 |
# Create a Streamlit app
|
12 |
+
st.title("SDXL Turbo")
|
13 |
|
14 |
# Add a text input for the prompt
|
15 |
+
prompt = st.text_input("Prompt")
|
16 |
|
17 |
# Generate the image based on the prompt
|
18 |
if st.button("Generate Image"):
|