wusize commited on
Commit
866b6f4
·
verified ·
1 Parent(s): e01f5f5

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -52,9 +52,9 @@ config = "configs/pipelines/stage_2_base.py"
52
  config = Config.fromfile(config)
53
  model = BUILDER.build(config.model).cuda().bfloat16().eval()
54
  checkpoint_path = "checkpoints/Puffin-Base.pth"
55
- checkpoint = torch.load(checkpoint_path)
56
  _ = model.load_state_dict(checkpoint, strict=False)
57
- _ = model.vae.load_state_dict(torch.load('checkpoints/vae.pth'), strict=True)
58
 
59
  def fig_to_image(fig):
60
  buf = io.BytesIO()
 
52
  config = Config.fromfile(config)
53
  model = BUILDER.build(config.model).cuda().bfloat16().eval()
54
  checkpoint_path = "checkpoints/Puffin-Base.pth"
55
+ checkpoint = torch.load(checkpoint_path, map_location='cpu')
56
  _ = model.load_state_dict(checkpoint, strict=False)
57
+ _ = model.vae.load_state_dict(torch.load('checkpoints/vae.pth', map_location='cpu'), strict=True)
58
 
59
  def fig_to_image(fig):
60
  buf = io.BytesIO()