manbeast3b commited on
Commit
a5fe896
·
verified ·
1 Parent(s): 3f391db

Update src/pipeline.py

Browse files
Files changed (1) hide show
  1. src/pipeline.py +2 -2
src/pipeline.py CHANGED
@@ -78,10 +78,10 @@ def load_pipeline():
78
  vae.decoder = D(16)
79
 
80
  def lsd(p, mod, pfx):
81
- sd = t.load(p, map_location="cpu", weights_only=True)
82
  f_sd = {k.strip(pfx): v for k, v in sd.items() if k.strip(pfx) in mod.state_dict() and v.size() == mod.state_dict()[k.strip(pfx)].size()}
83
  mod.load_state_dict(f_sd, strict=False)
84
- mod.to(dtype=t.float16)
85
 
86
  lsd("ko.pth", vae.encoder, "encoder.")
87
  lsd("ok.pth", vae.decoder, "decoder.")
 
78
  vae.decoder = D(16)
79
 
80
  def lsd(p, mod, pfx):
81
+ sd = torch.load(p, map_location="cpu", weights_only=True)
82
  f_sd = {k.strip(pfx): v for k, v in sd.items() if k.strip(pfx) in mod.state_dict() and v.size() == mod.state_dict()[k.strip(pfx)].size()}
83
  mod.load_state_dict(f_sd, strict=False)
84
+ #mod.to(dtype=torch.bfloat16)
85
 
86
  lsd("ko.pth", vae.encoder, "encoder.")
87
  lsd("ok.pth", vae.decoder, "decoder.")