fffiloni commited on
Commit
2e4870f
·
1 Parent(s): 8a0e066

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -39,11 +39,11 @@ from scipy.interpolate import LinearNDInterpolator
39
  from imageio import imread, imwrite
40
  from diffusers import StableDiffusionImg2ImgPipeline
41
 
42
- def diffuse(source_img):
43
- model_id = "runwayml/stable-diffusion-v1-5"
44
- pipe = StableDiffusionImg2ImgPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
45
- pipe = pipe.to("cuda")
46
-
47
  prompt = "space crew in a spaceship by Claude Monet"
48
  image = pipe(prompt, source_img).images[0]
49
  print(f"DIFFUSED IMG: {image}")
 
39
  from imageio import imread, imwrite
40
  from diffusers import StableDiffusionImg2ImgPipeline
41
 
42
+ model_id = "runwayml/stable-diffusion-v1-5"
43
+ pipe = StableDiffusionImg2ImgPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
44
+ pipe = pipe.to("cuda")
45
+
46
+ def diffuse(source_img):
47
  prompt = "space crew in a spaceship by Claude Monet"
48
  image = pipe(prompt, source_img).images[0]
49
  print(f"DIFFUSED IMG: {image}")