cocktailpeanut commited on
Commit
9ebf1f5
·
1 Parent(s): 7122033
Files changed (1) hide show
  1. gradio_demo/app.py +2 -1
gradio_demo/app.py CHANGED
@@ -126,7 +126,8 @@ def instantir_restore(
126
  print("Loading checkpoint...")
127
  aggregator_state_dict = torch.load(
128
  f"{instantir_path}/aggregator.pt",
129
- map_location="cpu"
 
130
  )
131
  pipe.aggregator.load_state_dict(aggregator_state_dict, strict=True)
132
  if not cpu_offload:
 
126
  print("Loading checkpoint...")
127
  aggregator_state_dict = torch.load(
128
  f"{instantir_path}/aggregator.pt",
129
+ map_location = device if not cpu_offload else "cpu"
130
+ # map_location="cpu"
131
  )
132
  pipe.aggregator.load_state_dict(aggregator_state_dict, strict=True)
133
  if not cpu_offload: