cocktailpeanut commited on
Commit
4f0058c
·
1 Parent(s): 7574648
Files changed (1) hide show
  1. gradio_demo/app.py +4 -4
gradio_demo/app.py CHANGED
@@ -125,7 +125,7 @@ def instantir_restore(
125
  print("Loading checkpoint...")
126
  aggregator_state_dict = torch.load(
127
  f"{instantir_path}/aggregator.pt",
128
- map_location="cpu"
129
  )
130
  pipe.aggregator.load_state_dict(aggregator_state_dict, strict=True)
131
  pipe.aggregator.to(device=device, dtype=torch_dtype)
@@ -140,10 +140,10 @@ def instantir_restore(
140
  pipe.unet.set_adapter('previewer')
141
 
142
  print('optimizing')
143
- pipe.enable_vae_tiling()
144
  if cpu_offload:
145
- # pipe.enable_model_cpu_offload()
146
- pipe.enable_sequential_cpu_offload()
147
  print('done')
148
 
149
 
 
125
  print("Loading checkpoint...")
126
  aggregator_state_dict = torch.load(
127
  f"{instantir_path}/aggregator.pt",
128
+ # map_location="cpu"
129
  )
130
  pipe.aggregator.load_state_dict(aggregator_state_dict, strict=True)
131
  pipe.aggregator.to(device=device, dtype=torch_dtype)
 
140
  pipe.unet.set_adapter('previewer')
141
 
142
  print('optimizing')
143
+ # pipe.enable_vae_tiling()
144
  if cpu_offload:
145
+ pipe.enable_model_cpu_offload()
146
+ # pipe.enable_sequential_cpu_offload()
147
  print('done')
148
 
149