Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -59,7 +59,9 @@ def generate(
|
|
59 |
|
60 |
if not use_vae:
|
61 |
pipe = StableDiffusionImg2ImgPipeline.from_pretrained("runwayml/stable-diffusion-v1-5", torch_dtype=torch.float16)
|
62 |
-
|
|
|
|
|
63 |
init_image = init_image.resize((768, 512))
|
64 |
|
65 |
if use_vae:
|
|
|
59 |
|
60 |
if not use_vae:
|
61 |
pipe = StableDiffusionImg2ImgPipeline.from_pretrained("runwayml/stable-diffusion-v1-5", torch_dtype=torch.float16)
|
62 |
+
response = requests.get("https://raw.githubusercontent.com/CompVis/stable-diffusion/main/assets/stable-samples/img2img/sketch-mountains-input.jpg")
|
63 |
+
image_bytes = BytesIO(response.content)
|
64 |
+
init_image = Image.open(image_bytes).convert("RGB")
|
65 |
init_image = init_image.resize((768, 512))
|
66 |
|
67 |
if use_vae:
|