Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -59,7 +59,6 @@ def generate(
|
|
59 |
|
60 |
if not use_vae:
|
61 |
pipe = StableDiffusionImg2ImgPipeline.from_pretrained("runwayml/stable-diffusion-v1-5", torch_dtype=torch.float16)
|
62 |
-
pipe = pipe.to(device)
|
63 |
|
64 |
url = "https://raw.githubusercontent.com/CompVis/stable-diffusion/main/assets/stable-samples/img2img/sketch-mountains-input.jpg"
|
65 |
|
@@ -93,8 +92,9 @@ def generate(
|
|
93 |
if not use_negative_prompt_2:
|
94 |
negative_prompt_2 = None # type: ignore
|
95 |
|
96 |
-
|
97 |
prompt=prompt,
|
|
|
98 |
negative_prompt=negative_prompt,
|
99 |
prompt_2=prompt_2,
|
100 |
negative_prompt_2=negative_prompt_2,
|
|
|
59 |
|
60 |
if not use_vae:
|
61 |
pipe = StableDiffusionImg2ImgPipeline.from_pretrained("runwayml/stable-diffusion-v1-5", torch_dtype=torch.float16)
|
|
|
62 |
|
63 |
url = "https://raw.githubusercontent.com/CompVis/stable-diffusion/main/assets/stable-samples/img2img/sketch-mountains-input.jpg"
|
64 |
|
|
|
92 |
if not use_negative_prompt_2:
|
93 |
negative_prompt_2 = None # type: ignore
|
94 |
|
95 |
+
images = pipe(
|
96 |
prompt=prompt,
|
97 |
+
image=init_image,
|
98 |
negative_prompt=negative_prompt,
|
99 |
prompt_2=prompt_2,
|
100 |
negative_prompt_2=negative_prompt_2,
|