chrisjayden commited on
Commit
ac225bf
·
verified ·
1 Parent(s): 4d71d5e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -5,8 +5,8 @@ from PIL import Image
5
 
6
  # Load the model (this runs when the Space starts)
7
  model_id = "nitrosocke/Ghibli-Diffusion"
8
- pipe = StableDiffusionImg2ImgPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
9
- pipe = pipe.to("cuda") # Use GPU if available in the Space
10
 
11
  # Define the inference function
12
  def ghibli_transform(input_image, prompt="ghibli style", strength=0.75, guidance_scale=7.5):
 
5
 
6
  # Load the model (this runs when the Space starts)
7
  model_id = "nitrosocke/Ghibli-Diffusion"
8
+ pipe = StableDiffusionImg2ImgPipeline.from_pretrained(model_id, torch_dtype=torch.float32) # Use float32 for CPU
9
+ #pipe = pipe.to("cuda") # Use GPU if available in the Space
10
 
11
  # Define the inference function
12
  def ghibli_transform(input_image, prompt="ghibli style", strength=0.75, guidance_scale=7.5):