Spaces:
Runtime error
Runtime error
da03
commited on
Commit
·
fbec427
1
Parent(s):
83455bf
main.py
CHANGED
@@ -224,8 +224,8 @@ def predict_next_frame(previous_frames: List[np.ndarray], previous_actions: List
|
|
224 |
prev_y = 0
|
225 |
#print ('here')
|
226 |
|
227 |
-
prompt = 'N + 0
|
228 |
-
previous_actions = [('move', (
|
229 |
|
230 |
|
231 |
for action_type, pos in previous_actions: #[-8:]:
|
|
|
224 |
prev_y = 0
|
225 |
#print ('here')
|
226 |
|
227 |
+
prompt = 'N + 0 0 0 0 : + 0 0 4 8 N + 0 2 4 8 : + 0 1 2 0 N + 0 2 4 8 : + 0 3 1 2 N + 0 0 9 6 : + 0 0 1 6 L + 0 4 8 0 : + 0 1 2 0 N + 0 2 9 6 : + 0 0 2 4 N + 0 2 0 0 : + 0 3 0 4 N + 0 2 7 2 : + 0 1 5 2'
|
228 |
+
previous_actions = [('move', (0, 48)), ('move', (248, 120)), ('move', (248, 312)), ('move', (96, 16)), ('left_click', (480, 120)), ('move', (296, 24)), ('move', (200, 304)), ('move', (272, 152))]
|
229 |
|
230 |
|
231 |
for action_type, pos in previous_actions: #[-8:]:
|
utils.py
CHANGED
@@ -37,6 +37,7 @@ def sample_frame(model: LatentDiffusion, prompt: str, image_sequence: torch.Tens
|
|
37 |
#uc = model.enc_concat_seq(uc, u_dict, 'c_concat')
|
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])
|
|
|
37 |
#uc = model.enc_concat_seq(uc, u_dict, 'c_concat')
|
38 |
|
39 |
c_dict = {'c_crossattn': prompt, 'c_concat': image_sequence}
|
40 |
+
model.eval()
|
41 |
c = model.get_learned_conditioning(c_dict)
|
42 |
print (c['c_crossattn'].shape)
|
43 |
print (c['c_crossattn'][0])
|