Spaces:
Runtime error
Runtime error
da03
commited on
Commit
·
83455bf
1
Parent(s):
fcd17c7
main.py
CHANGED
@@ -224,6 +224,8 @@ def predict_next_frame(previous_frames: List[np.ndarray], previous_actions: List
|
|
224 |
prev_y = 0
|
225 |
#print ('here')
|
226 |
|
|
|
|
|
227 |
|
228 |
|
229 |
for action_type, pos in previous_actions: #[-8:]:
|
|
|
224 |
prev_y = 0
|
225 |
#print ('here')
|
226 |
|
227 |
+
prompt = 'N + 0 2 4 0 : + 0 0 3 2 N + 0 1 6 0 : + 0 0 2 4 N + 0 1 9 2 : + 0 0 9 6 N + 0 1 1 2 : + 0 0 9 6 N + 0 1 5 2 : + 0 1 7 6 N + 0 0 0 0 : + 0 2 3 2 N + 0 3 2 0 : + 0 2 7 2 N + 0 4 6 4 : + 0 3 2 8'
|
228 |
+
previous_actions = [('move', (240, 32)), ('move', (160, 24)), ('move', (192, 96)), ('move', (112, 96)), ('move', (152, 176)), ('move', (0, 232)), ('move', (320, 272)), ('move', (464, 328))]
|
229 |
|
230 |
|
231 |
for action_type, pos in previous_actions: #[-8:]:
|
utils.py
CHANGED
@@ -38,6 +38,9 @@ def sample_frame(model: LatentDiffusion, prompt: str, image_sequence: torch.Tens
|
|
38 |
|
39 |
c_dict = {'c_crossattn': prompt, 'c_concat': image_sequence}
|
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)
|
|
|
38 |
|
39 |
c_dict = {'c_crossattn': prompt, 'c_concat': image_sequence}
|
40 |
c = model.get_learned_conditioning(c_dict)
|
41 |
+
print (c['c_crossattn'].shape)
|
42 |
+
print (c['c_crossattn'][0])
|
43 |
+
print (prompt)
|
44 |
c = model.enc_concat_seq(c, c_dict, 'c_concat')
|
45 |
# Zero out the corresponding subtensors in c_concat for padding images
|
46 |
padding_mask = torch.isclose(image_sequence, torch.tensor(-1.0), rtol=1e-5, atol=1e-5).all(dim=(1, 2, 3)).unsqueeze(0)
|