Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -30,21 +30,21 @@ print("The model will be running on :: ", device, " ~device")
|
|
30 |
model_id_or_path = "CompVis/stable-diffusion-v1-4"
|
31 |
pipe = StableDiffusionInpaintingPipeline.from_pretrained(
|
32 |
model_id_or_path,
|
33 |
-
revision="fp16",
|
34 |
-
torch_dtype=torch.
|
35 |
use_auth_token=auth_token
|
36 |
).to(device)
|
37 |
#pipe = pipe.to(device)
|
38 |
#self.register_buffer('n_', ...)
|
39 |
#print ("torch.backends.mps.is_available: ", torch.backends.mps.is_available())
|
40 |
|
41 |
-
model = CLIPDensePredT(version='ViT-B/16', reduce_dim=
|
42 |
|
43 |
model = model.to(torch.device(device))
|
44 |
-
model.eval()
|
45 |
|
46 |
|
47 |
-
weightsPATH = './clipseg/weights/
|
48 |
|
49 |
#state = {'model': model.state_dict()}
|
50 |
#torch.save(state, weightsPATH)
|
|
|
30 |
model_id_or_path = "CompVis/stable-diffusion-v1-4"
|
31 |
pipe = StableDiffusionInpaintingPipeline.from_pretrained(
|
32 |
model_id_or_path,
|
33 |
+
#revision="fp16",
|
34 |
+
torch_dtype=torch.float,
|
35 |
use_auth_token=auth_token
|
36 |
).to(device)
|
37 |
#pipe = pipe.to(device)
|
38 |
#self.register_buffer('n_', ...)
|
39 |
#print ("torch.backends.mps.is_available: ", torch.backends.mps.is_available())
|
40 |
|
41 |
+
model = CLIPDensePredT(version='ViT-B/16', reduce_dim=64, complex_trans_conv=True)
|
42 |
|
43 |
model = model.to(torch.device(device))
|
44 |
+
model.eval()#.half()
|
45 |
|
46 |
|
47 |
+
weightsPATH = './clipseg/weights/rd64-uni.pth'
|
48 |
|
49 |
#state = {'model': model.state_dict()}
|
50 |
#torch.save(state, weightsPATH)
|