Spaces:
Runtime error
Runtime error
da03
commited on
Commit
·
d8a95e7
1
Parent(s):
18baa4d
main.py
CHANGED
@@ -425,7 +425,7 @@ async def websocket_endpoint(websocket: WebSocket):
|
|
425 |
x, y, action_type = parse_action_string(position)
|
426 |
mouse_position = (x, y)
|
427 |
|
428 |
-
previous_actions.append((action_type, mouse_position))
|
429 |
if not DEBUG_TEACHER_FORCING:
|
430 |
previous_actions = []
|
431 |
|
@@ -474,11 +474,12 @@ async def websocket_endpoint(websocket: WebSocket):
|
|
474 |
#mouse_position = position.split('~')
|
475 |
#mouse_position = [int(item) for item in mouse_position]
|
476 |
#mouse_position = '+ 0 8 1 5 : + 0 3 3 5'
|
477 |
-
if
|
478 |
position = positions[0]
|
479 |
positions = positions[1:]
|
480 |
x, y, action_type = parse_action_string(position)
|
481 |
mouse_position = (x, y)
|
|
|
482 |
if False:
|
483 |
previous_actions.append((action_type, mouse_position))
|
484 |
#previous_actions = [(action_type, mouse_position)]
|
@@ -501,7 +502,7 @@ async def websocket_endpoint(websocket: WebSocket):
|
|
501 |
next_frame, next_frame_append = predict_next_frame(previous_frames, previous_actions)
|
502 |
# Load and append the corresponding ground truth image instead of model output
|
503 |
print ('here4', len(previous_frames))
|
504 |
-
if
|
505 |
img = Image.open(f"record_10003/image_{117+len(previous_frames)}.png")
|
506 |
previous_frames.append(img)
|
507 |
else:
|
|
|
425 |
x, y, action_type = parse_action_string(position)
|
426 |
mouse_position = (x, y)
|
427 |
|
428 |
+
#previous_actions.append((action_type, mouse_position))
|
429 |
if not DEBUG_TEACHER_FORCING:
|
430 |
previous_actions = []
|
431 |
|
|
|
474 |
#mouse_position = position.split('~')
|
475 |
#mouse_position = [int(item) for item in mouse_position]
|
476 |
#mouse_position = '+ 0 8 1 5 : + 0 3 3 5'
|
477 |
+
if DEBUG_TEACHER_FORCING:
|
478 |
position = positions[0]
|
479 |
positions = positions[1:]
|
480 |
x, y, action_type = parse_action_string(position)
|
481 |
mouse_position = (x, y)
|
482 |
+
previous_actions.append((action_type, mouse_position))
|
483 |
if False:
|
484 |
previous_actions.append((action_type, mouse_position))
|
485 |
#previous_actions = [(action_type, mouse_position)]
|
|
|
502 |
next_frame, next_frame_append = predict_next_frame(previous_frames, previous_actions)
|
503 |
# Load and append the corresponding ground truth image instead of model output
|
504 |
print ('here4', len(previous_frames))
|
505 |
+
if DEBUG_TEACHER_FORCING:
|
506 |
img = Image.open(f"record_10003/image_{117+len(previous_frames)}.png")
|
507 |
previous_frames.append(img)
|
508 |
else:
|
utils.py
CHANGED
@@ -63,7 +63,7 @@ def sample_frame(model: LatentDiffusion, prompt: str, image_sequence: torch.Tens
|
|
63 |
#time.sleep(120)
|
64 |
print ('finished sleeping')
|
65 |
DDPM = False
|
66 |
-
DDPM =
|
67 |
|
68 |
if DEBUG:
|
69 |
#c['c_concat'] = c['c_concat']*0
|
|
|
63 |
#time.sleep(120)
|
64 |
print ('finished sleeping')
|
65 |
DDPM = False
|
66 |
+
DDPM = True
|
67 |
|
68 |
if DEBUG:
|
69 |
#c['c_concat'] = c['c_concat']*0
|