alfabill commited on
Commit
b6bae18
·
1 Parent(s): 556f251

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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.float16,
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('cuda')), strict=False)
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(),