Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -54,12 +54,16 @@ def download_image(url):
|
|
54 |
return PIL.Image.open(BytesIO(response.content)).convert("RGB")
|
55 |
|
56 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
|
|
|
|
57 |
pipe = StableDiffusionInpaintingPipeline.from_pretrained(
|
58 |
-
|
59 |
revision="fp16",
|
60 |
-
torch_dtype=torch.
|
61 |
-
use_auth_token=auth_token
|
62 |
-
)
|
|
|
|
|
63 |
|
64 |
model = CLIPDensePredT(version='ViT-B/16', reduce_dim=64)
|
65 |
model.eval()
|
|
|
54 |
return PIL.Image.open(BytesIO(response.content)).convert("RGB")
|
55 |
|
56 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
57 |
+
|
58 |
+
model_id_or_path = "CompVis/stable-diffusion-v1-4"
|
59 |
pipe = StableDiffusionInpaintingPipeline.from_pretrained(
|
60 |
+
model_id_or_path,
|
61 |
revision="fp16",
|
62 |
+
torch_dtype=torch.float,
|
63 |
+
use_auth_token=auth_token
|
64 |
+
)
|
65 |
+
|
66 |
+
pipe = pipe.to(device)
|
67 |
|
68 |
model = CLIPDensePredT(version='ViT-B/16', reduce_dim=64)
|
69 |
model.eval()
|