nightfury commited on
Commit
c84b0ab
1 Parent(s): 6766e07

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -59,15 +59,17 @@ 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.float32, #float16
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()
70
- model.load_state_dict(torch.load('./clipseg/weights/rd64-uni.pth', map_location=torch.device(device)), strict=False)
71
 
72
  imgRes = 256
73
 
 
59
  pipe = StableDiffusionInpaintingPipeline.from_pretrained(
60
  model_id_or_path,
61
  revision="fp16",
62
+ torch_dtype=torch.long, #float16
63
  use_auth_token=auth_token
64
  )
65
+ #self.register_buffer('n_', ...)
66
+ print ("torch.backends.mps.is_available: ", torch.backends.mps.is_available())
67
 
68
  pipe = pipe.to(device)
69
 
70
  model = CLIPDensePredT(version='ViT-B/16', reduce_dim=64)
71
  model.eval()
72
+ model.load_state_dict(torch.load('./clipseg/weights/rd64-uni.pth', map_location=torch.device(device)), strict=True) #False
73
 
74
  imgRes = 256
75