nightfury commited on
Commit
e50e207
1 Parent(s): 57b9653

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
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.long,
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=16, complex_trans_conv=True)
42
 
43
  model = model.to(torch.device(device))
44
- model.eval().half()
45
 
46
 
47
- weightsPATH = './clipseg/weights/rd16-uni.pth'
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)