fffiloni commited on
Commit
b9092f0
·
verified ·
1 Parent(s): 4d5b71b

ux(progress): add finer init progress steps and use weights_only for checkpoint loading

Browse files
Files changed (1) hide show
  1. app_wip.py +5 -1
app_wip.py CHANGED
@@ -95,7 +95,11 @@ def initialize_pipeline(progress: gr.Progress | None = None):
95
 
96
  if progress is not None:
97
  progress(0.11, desc="Init: loading reward forcing checkpoint")
98
- state_dict = torch.load(CHECKPOINT_PATH, map_location="cpu")
 
 
 
 
99
  pipeline.generator.load_state_dict(state_dict)
100
 
101
  checkpoint_step = os.path.basename(os.path.dirname(CHECKPOINT_PATH))
 
95
 
96
  if progress is not None:
97
  progress(0.11, desc="Init: loading reward forcing checkpoint")
98
+ state_dict = torch.load(
99
+ CHECKPOINT_PATH,
100
+ map_location="cpu",
101
+ weights_only=True,
102
+ )
103
  pipeline.generator.load_state_dict(state_dict)
104
 
105
  checkpoint_step = os.path.basename(os.path.dirname(CHECKPOINT_PATH))