Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -18,6 +18,9 @@ device = "cuda" if torch.cuda.is_available() else "cpu"
|
|
18 |
pipe = StableDiffusionImg2ImgPipeline.from_pretrained(modelid, revision="fp16", torch_dtype=torch.float16)
|
19 |
pipe.to(device)
|
20 |
|
|
|
|
|
|
|
21 |
def generate_image(prompt):
|
22 |
response = requests.get(url)
|
23 |
init_img = Image.open(BytesIO(response.content)).convert("RGB")
|
|
|
18 |
pipe = StableDiffusionImg2ImgPipeline.from_pretrained(modelid, revision="fp16", torch_dtype=torch.float16)
|
19 |
pipe.to(device)
|
20 |
|
21 |
+
url = "https://raw.githubusercontent.com/CompVis/stable-diffusion/main/assets/stable-samples/img2img/sketch-mountains-input.jpg"
|
22 |
+
|
23 |
+
|
24 |
def generate_image(prompt):
|
25 |
response = requests.get(url)
|
26 |
init_img = Image.open(BytesIO(response.content)).convert("RGB")
|