Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -25,13 +25,13 @@ device = "cuda" if torch.cuda.is_available() else "cpu"
|
|
25 |
pipe = DiffusionPipeline.from_pretrained(
|
26 |
"runwayml/stable-diffusion-inpainting",
|
27 |
revision="fp16",
|
28 |
-
torch_dtype=torch.
|
29 |
use_auth_token="",
|
30 |
).to(device)
|
31 |
|
32 |
model = CLIPDensePredT(version='ViT-B/16', reduce_dim=64)
|
33 |
model.eval()
|
34 |
-
model.load_state_dict(torch.load('./clipseg/weights/rd64-uni.pth', map_location=torch.device('
|
35 |
|
36 |
transform = transforms.Compose([
|
37 |
transforms.ToTensor(),
|
|
|
25 |
pipe = DiffusionPipeline.from_pretrained(
|
26 |
"runwayml/stable-diffusion-inpainting",
|
27 |
revision="fp16",
|
28 |
+
torch_dtype=torch.float32,
|
29 |
use_auth_token="",
|
30 |
).to(device)
|
31 |
|
32 |
model = CLIPDensePredT(version='ViT-B/16', reduce_dim=64)
|
33 |
model.eval()
|
34 |
+
model.load_state_dict(torch.load('./clipseg/weights/rd64-uni.pth', map_location=torch.device('cpu')), strict=False)
|
35 |
|
36 |
transform = transforms.Compose([
|
37 |
transforms.ToTensor(),
|