Spaces:
Runtime error
Runtime error
Commit
·
cd40774
1
Parent(s):
ad0d386
Update utils.py
Browse files
utils.py
CHANGED
@@ -41,12 +41,12 @@ def sample_frame(model: LatentDiffusion, prompt: str, image_sequence: torch.Tens
|
|
41 |
c = model.enc_concat_seq(c, c_dict, 'c_concat')
|
42 |
if pos_map is not None:
|
43 |
print (pos_map.shape, c['c_concat'].shape)
|
44 |
-
c['c_concat'] = torch.cat([c['c_concat'][:, :,
|
45 |
|
46 |
print ('sleeping')
|
47 |
#time.sleep(120)
|
48 |
print ('finished sleeping')
|
49 |
-
samples_ddim = model.p_sample_loop(cond=c, shape=[1, 3,
|
50 |
#samples_ddim, _ = sampler.sample(S=999,
|
51 |
# conditioning=c,
|
52 |
# batch_size=1,
|
|
|
41 |
c = model.enc_concat_seq(c, c_dict, 'c_concat')
|
42 |
if pos_map is not None:
|
43 |
print (pos_map.shape, c['c_concat'].shape)
|
44 |
+
c['c_concat'] = torch.cat([c['c_concat'][:, :, :, :], pos_map.to(c['c_concat'].device).unsqueeze(0)], dim=1)
|
45 |
|
46 |
print ('sleeping')
|
47 |
#time.sleep(120)
|
48 |
print ('finished sleeping')
|
49 |
+
samples_ddim = model.p_sample_loop(cond=c, shape=[1, 3, 256, 256], return_intermediates=False, verbose=True)
|
50 |
#samples_ddim, _ = sampler.sample(S=999,
|
51 |
# conditioning=c,
|
52 |
# batch_size=1,
|