Thaweewat commited on
Commit
cddeea6
·
1 Parent(s): 35775c4

Reduce model memory

Browse files
Files changed (2) hide show
  1. .idea/workspace.xml +1 -1
  2. app.py +0 -17
.idea/workspace.xml CHANGED
@@ -46,7 +46,7 @@
46
  <option name="number" value="Default" />
47
  <option name="presentableId" value="Default" />
48
  <updated>1677222707113</updated>
49
- <workItem from="1677222708286" duration="4501000" />
50
  </task>
51
  <servers />
52
  </component>
 
46
  <option name="number" value="Default" />
47
  <option name="presentableId" value="Default" />
48
  <updated>1677222707113</updated>
49
+ <workItem from="1677222708286" duration="5087000" />
50
  </task>
51
  <servers />
52
  </component>
app.py CHANGED
@@ -13,24 +13,7 @@ from huggingface_hub import hf_hub_url, cached_download
13
 
14
 
15
  REPO_ID = "lllyasviel/ControlNet"
16
- canny_checkpoint = "models/control_sd15_canny.pth"
17
  scribble_checkpoint = "models/control_sd15_scribble.pth"
18
- pose_checkpoint = "models/control_sd15_openpose.pth"
19
-
20
- canny_model = create_model('./models/cldm_v15.yaml').cpu()
21
- canny_model.load_state_dict(load_state_dict(cached_download(
22
- hf_hub_url(REPO_ID, canny_checkpoint)
23
- ), location='cpu'))
24
- canny_model = canny_model.cuda()
25
- ddim_sampler = DDIMSampler(canny_model)
26
-
27
- pose_model = create_model('./models/cldm_v15.yaml').cpu()
28
- pose_model.load_state_dict(load_state_dict(cached_download(
29
- hf_hub_url(REPO_ID, pose_checkpoint)
30
- ), location='cpu'))
31
- pose_model = pose_model.cuda()
32
- ddim_sampler_pose = DDIMSampler(pose_model)
33
-
34
  scribble_model = create_model('./models/cldm_v15.yaml').cpu()
35
  scribble_model.load_state_dict(load_state_dict(cached_download(
36
  hf_hub_url(REPO_ID, scribble_checkpoint)
 
13
 
14
 
15
  REPO_ID = "lllyasviel/ControlNet"
 
16
  scribble_checkpoint = "models/control_sd15_scribble.pth"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  scribble_model = create_model('./models/cldm_v15.yaml').cpu()
18
  scribble_model.load_state_dict(load_state_dict(cached_download(
19
  hf_hub_url(REPO_ID, scribble_checkpoint)