bo.l commited on
Commit
4484346
·
1 Parent(s): 3ba81e2

update model2

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -52,8 +52,8 @@ flux_pipeline.text_encoder.to(device).to(torch.bfloat16)
52
  flux_pipeline.text_encoder_2.to(device).to(torch.bfloat16)
53
  flux_pipeline.scheduler.config.stochastic_sampling = False
54
  ckpt_path = hf_hub_download("NoobDoge/Multi_Ref_Model", "full_ema_model.safetensors")
55
- new_weight = load_file(ckpt_path)
56
- flux_pipeline.transformer.load_state_dict(new_weight)
57
  flux_pipeline.transformer.to(device).to(torch.bfloat16)
58
 
59
  MAX_SEED = np.iinfo(np.int32).max
 
52
  flux_pipeline.text_encoder_2.to(device).to(torch.bfloat16)
53
  flux_pipeline.scheduler.config.stochastic_sampling = False
54
  ckpt_path = hf_hub_download("NoobDoge/Multi_Ref_Model", "full_ema_model.safetensors")
55
+ # new_weight = load_file(ckpt_path)
56
+ flux_pipeline.transformer.from_single_file(ckpt_path, torch_dtype=torch.bfloat16)
57
  flux_pipeline.transformer.to(device).to(torch.bfloat16)
58
 
59
  MAX_SEED = np.iinfo(np.int32).max