yuntian-deng commited on
Commit
a10a91e
·
1 Parent(s): c160b02

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +5 -2
utils.py CHANGED
@@ -53,8 +53,11 @@ def sample_frame(model: LatentDiffusion, prompt: str, image_sequence: torch.Tens
53
  print ('sleeping')
54
  #time.sleep(120)
55
  print ('finished sleeping')
56
- #samples_ddim = model.p_sample_loop(cond=c, shape=[1, 3, 64, 64], return_intermediates=False, verbose=True)
57
- samples_ddim, _ = sampler.sample(S=8,
 
 
 
58
  conditioning=c,
59
  batch_size=1,
60
  shape=[4, 64, 64],
 
53
  print ('sleeping')
54
  #time.sleep(120)
55
  print ('finished sleeping')
56
+ DDPM = True
57
+ if DDPM:
58
+ samples_ddim = model.p_sample_loop(cond=c, shape=[1, 4, 64, 64], return_intermediates=False, verbose=True)
59
+ else:
60
+ samples_ddim, _ = sampler.sample(S=8,
61
  conditioning=c,
62
  batch_size=1,
63
  shape=[4, 64, 64],