multimodalart HF staff commited on
Commit
3faebef
·
verified ·
1 Parent(s): 478112e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -6
app.py CHANGED
@@ -47,12 +47,9 @@ if torch.cuda.is_available():
47
  previewer = Previewer()
48
  previewer_state_dict = torch.load("previewer/previewer_v1_100k.pt", map_location=torch.device('cpu'))["state_dict"]
49
  previewer.load_state_dict(previewer_state_dict)
50
- def callback_prior(i, t, latents, kwargs):
51
- print("i", i)
52
- print("t", t)
53
- print("latents", latents)
54
- print("kwargs", kwargs)
55
- print(i, t, latents, kwargs)
56
  output = previewer(latents)
57
  output = numpy_to_pil(output.clamp(0, 1).permute(0, 2, 3, 1).float().cpu().numpy())
58
  return output
 
47
  previewer = Previewer()
48
  previewer_state_dict = torch.load("previewer/previewer_v1_100k.pt", map_location=torch.device('cpu'))["state_dict"]
49
  previewer.load_state_dict(previewer_state_dict)
50
+ def callback_prior(self_remote, i, t, kwargs):
51
+ latents = kwargs["latents"]
52
+ print(latents)
 
 
 
53
  output = previewer(latents)
54
  output = numpy_to_pil(output.clamp(0, 1).permute(0, 2, 3, 1).float().cpu().numpy())
55
  return output