Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -4,12 +4,12 @@ import gradio as gr
|
|
4 |
from diffusers import StableDiffusionImg2ImgPipeline
|
5 |
|
6 |
# Load the Stable Diffusion img2img pipeline
|
7 |
-
device = "
|
8 |
pipe = StableDiffusionImg2ImgPipeline.from_pretrained(
|
9 |
"runwayml/stable-diffusion-v1-5",
|
10 |
torch_dtype=torch.float16,
|
11 |
).to(device)
|
12 |
-
pipe.enable_attention_slicing()
|
13 |
|
14 |
# Predefined prompts
|
15 |
PROMPTS = {
|
|
|
4 |
from diffusers import StableDiffusionImg2ImgPipeline
|
5 |
|
6 |
# Load the Stable Diffusion img2img pipeline
|
7 |
+
device = "cpu"
|
8 |
pipe = StableDiffusionImg2ImgPipeline.from_pretrained(
|
9 |
"runwayml/stable-diffusion-v1-5",
|
10 |
torch_dtype=torch.float16,
|
11 |
).to(device)
|
12 |
+
#pipe.enable_attention_slicing()
|
13 |
|
14 |
# Predefined prompts
|
15 |
PROMPTS = {
|