Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
import torch
|
| 2 |
-
from diffusers import
|
| 3 |
import gradio as gr
|
| 4 |
import spaces
|
| 5 |
|
|
@@ -11,7 +11,7 @@ else:
|
|
| 11 |
print("Using CPU")
|
| 12 |
|
| 13 |
# Initialize the pipeline and download the model
|
| 14 |
-
pipe =
|
| 15 |
pipe.to(device)
|
| 16 |
|
| 17 |
# Define the image generation function
|
|
|
|
| 1 |
import torch
|
| 2 |
+
from diffusers import StableDiffusion
|
| 3 |
import gradio as gr
|
| 4 |
import spaces
|
| 5 |
|
|
|
|
| 11 |
print("Using CPU")
|
| 12 |
|
| 13 |
# Initialize the pipeline and download the model
|
| 14 |
+
pipe = StableDiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-3-medium", torch_dtype=torch.float16, use_auth_token=HF_TOKEN)
|
| 15 |
pipe.to(device)
|
| 16 |
|
| 17 |
# Define the image generation function
|