Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,12 +2,12 @@ import torch
|
|
| 2 |
from diffusers import StableDiffusionPipeline
|
| 3 |
import streamlit as st
|
| 4 |
|
| 5 |
-
# Load the Stable Diffusion pipeline
|
| 6 |
pipe = StableDiffusionPipeline.from_pretrained(
|
| 7 |
"dreamlike-art/dreamlike-photoreal-2.0",
|
| 8 |
-
torch_dtype=torch.
|
| 9 |
use_safetensors=True
|
| 10 |
-
).to("
|
| 11 |
|
| 12 |
# Define the prompt and set a random seed
|
| 13 |
prompt = "cinematic photo of Godzilla eating sushi with a cat in an izakaya, 35mm photograph, film, professional, 4k, highly detailed"
|
|
|
|
| 2 |
from diffusers import StableDiffusionPipeline
|
| 3 |
import streamlit as st
|
| 4 |
|
| 5 |
+
# Load the Stable Diffusion pipeline on CPU
|
| 6 |
pipe = StableDiffusionPipeline.from_pretrained(
|
| 7 |
"dreamlike-art/dreamlike-photoreal-2.0",
|
| 8 |
+
torch_dtype=torch.float32, # Use float32 for CPU
|
| 9 |
use_safetensors=True
|
| 10 |
+
).to("cpu") # Change to CPU
|
| 11 |
|
| 12 |
# Define the prompt and set a random seed
|
| 13 |
prompt = "cinematic photo of Godzilla eating sushi with a cat in an izakaya, 35mm photograph, film, professional, 4k, highly detailed"
|