da03 commited on
Commit
77ade98
·
1 Parent(s): e1579d0
Files changed (1) hide show
  1. utils.py +1 -1
utils.py CHANGED
@@ -40,7 +40,7 @@ def sample_frame(model: LatentDiffusion, prompt: str, image_sequence: torch.Tens
40
  c = model.get_learned_conditioning(c_dict)
41
  c = model.enc_concat_seq(c, c_dict, 'c_concat')
42
  # Zero out the corresponding subtensors in c_concat for padding images
43
- padding_mask = torch.isclose(image_sequence, torch.tensor(-1.0), rtol=1e-5, atol=1e-5).all(dim=(1, 2, 3)).unsqueeze(1)
44
  print (padding_mask)
45
  padding_mask = padding_mask.repeat(1, 4) # Repeat mask 4 times for each projected channel
46
  print (image_sequence.shape, padding_mask.shape, c['c_concat'].shape)
 
40
  c = model.get_learned_conditioning(c_dict)
41
  c = model.enc_concat_seq(c, c_dict, 'c_concat')
42
  # Zero out the corresponding subtensors in c_concat for padding images
43
+ padding_mask = torch.isclose(image_sequence, torch.tensor(-1.0), rtol=1e-5, atol=1e-5).all(dim=(1, 2, 3)).unsqueeze(0)
44
  print (padding_mask)
45
  padding_mask = padding_mask.repeat(1, 4) # Repeat mask 4 times for each projected channel
46
  print (image_sequence.shape, padding_mask.shape, c['c_concat'].shape)