Spaces:
Runtime error
Runtime error
da03
commited on
Commit
·
32367a7
1
Parent(s):
2db4576
utils.py
CHANGED
|
@@ -54,6 +54,8 @@ def sample_frame(model: LatentDiffusion, prompt: str, image_sequence: torch.Tens
|
|
| 54 |
pos_map = pos_maps[0]
|
| 55 |
leftclick_map = torch.cat(leftclick_maps, dim=0)
|
| 56 |
print (pos_maps[0].shape, c['c_concat'].shape, leftclick_map.shape)
|
|
|
|
|
|
|
| 57 |
c['c_concat'] = torch.cat([c['c_concat'][:, :, :, :], pos_maps[0].to(c['c_concat'].device).unsqueeze(0), leftclick_map.to(c['c_concat'].device).unsqueeze(0)], dim=1)
|
| 58 |
|
| 59 |
print ('sleeping')
|
|
@@ -64,8 +66,10 @@ def sample_frame(model: LatentDiffusion, prompt: str, image_sequence: torch.Tens
|
|
| 64 |
|
| 65 |
DEBUG = True
|
| 66 |
if DEBUG:
|
| 67 |
-
c['c_concat'] = c['c_concat']*0
|
| 68 |
print ('utils prompt', prompt, c['c_concat'].shape, c.keys())
|
|
|
|
|
|
|
| 69 |
|
| 70 |
if DDPM:
|
| 71 |
samples_ddim = model.p_sample_loop(cond=c, shape=[1, 4, 48, 64], return_intermediates=False, verbose=True)
|
|
|
|
| 54 |
pos_map = pos_maps[0]
|
| 55 |
leftclick_map = torch.cat(leftclick_maps, dim=0)
|
| 56 |
print (pos_maps[0].shape, c['c_concat'].shape, leftclick_map.shape)
|
| 57 |
+
if DEBUG:
|
| 58 |
+
c['c_concat'] = c['c_concat']*0
|
| 59 |
c['c_concat'] = torch.cat([c['c_concat'][:, :, :, :], pos_maps[0].to(c['c_concat'].device).unsqueeze(0), leftclick_map.to(c['c_concat'].device).unsqueeze(0)], dim=1)
|
| 60 |
|
| 61 |
print ('sleeping')
|
|
|
|
| 66 |
|
| 67 |
DEBUG = True
|
| 68 |
if DEBUG:
|
| 69 |
+
#c['c_concat'] = c['c_concat']*0
|
| 70 |
print ('utils prompt', prompt, c['c_concat'].shape, c.keys())
|
| 71 |
+
print (c['c_concat'].nonzero())
|
| 72 |
+
#print (c['c_concat'][0, 0, :, :])
|
| 73 |
|
| 74 |
if DDPM:
|
| 75 |
samples_ddim = model.p_sample_loop(cond=c, shape=[1, 4, 48, 64], return_intermediates=False, verbose=True)
|