RamAnanth1 commited on
Commit
b1693d8
β€’
1 Parent(s): 4af04e2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -49,6 +49,11 @@ model, _, _ = load_model(config, ckpt_path,
49
  inject_lora=False,
50
  lora_scale=None,
51
  )
 
 
 
 
 
52
  ddim_sampler = DDIMSampler(model)
53
 
54
  def sample_denoising_batch(model, noise_shape, condition, *args,
 
49
  inject_lora=False,
50
  lora_scale=None,
51
  )
52
+ state_dict = torch.load(adapter_ckpt, map_location="cpu")
53
+ if "state_dict" in list(state_dict.keys()):
54
+ state_dict = state_dict["state_dict"]
55
+ model.adapter.load_state_dict(state_dict, strict=True)
56
+
57
  ddim_sampler = DDIMSampler(model)
58
 
59
  def sample_denoising_batch(model, noise_shape, condition, *args,