ktrndy commited on
Commit
645b875
·
verified ·
1 Parent(s): 209acb7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -46,8 +46,8 @@ def infer(
46
  pipe.unet = PeftModel.from_pretrained(pipe.unet, unet_sub_dir)
47
  pipe.text_encoder = PeftModel.from_pretrained(pipe.text_encoder, text_encoder_sub_dir)
48
 
49
- # pipe.unet.load_state_dict({k: lora_scale*v for k, v in pipe.unet.state_dict().items()})
50
- # pipe.text_encoder.load_state_dict({k: lora_scale*v for k, v in pipe.text_encoder.state_dict().items()})
51
 
52
  if torch_dtype in (torch.float16, torch.bfloat16):
53
  pipe.unet.half()
 
46
  pipe.unet = PeftModel.from_pretrained(pipe.unet, unet_sub_dir)
47
  pipe.text_encoder = PeftModel.from_pretrained(pipe.text_encoder, text_encoder_sub_dir)
48
 
49
+ pipe.unet.load_state_dict({k: lora_scale*v for k, v in pipe.unet.state_dict().items()})
50
+ pipe.text_encoder.load_state_dict({k: lora_scale*v for k, v in pipe.text_encoder.state_dict().items()})
51
 
52
  if torch_dtype in (torch.float16, torch.bfloat16):
53
  pipe.unet.half()