Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -62,10 +62,10 @@ def generate(
|
|
62 |
url = "https://raw.githubusercontent.com/CompVis/stable-diffusion/main/assets/stable-samples/img2img/sketch-mountains-input.jpg"
|
63 |
|
64 |
response = requests.get(url)
|
65 |
-
|
66 |
init_image = Image.open(BytesIO(response.content)).convert("RGB")
|
67 |
init_image = init_image.resize((768, 512))
|
68 |
-
|
69 |
print(f"Error downloading image: {response.status_code}")
|
70 |
|
71 |
if use_vae:
|
|
|
62 |
url = "https://raw.githubusercontent.com/CompVis/stable-diffusion/main/assets/stable-samples/img2img/sketch-mountains-input.jpg"
|
63 |
|
64 |
response = requests.get(url)
|
65 |
+
if response.status_code == 200:
|
66 |
init_image = Image.open(BytesIO(response.content)).convert("RGB")
|
67 |
init_image = init_image.resize((768, 512))
|
68 |
+
else:
|
69 |
print(f"Error downloading image: {response.status_code}")
|
70 |
|
71 |
if use_vae:
|