sushann222 commited on
Commit
5feb57d
·
verified ·
1 Parent(s): 622717e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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.float16,
9
  use_safetensors=True
10
- ).to("cuda")
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"