Skip to content

Commit

Permalink
Add next call loop in qwenvl2 to queue fix
Browse files Browse the repository at this point in the history
  • Loading branch information
haixuanTao committed Oct 11, 2024
1 parent a254d70 commit edc1467
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion examples/vlm/dataflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ nodes:
image:
source: camera/image
queue_size: 1
tick: dora/timer/millis/300
tick: dora/timer/millis/100
outputs:
- text
- tick
Expand Down
9 changes: 9 additions & 0 deletions node-hub/dora-qwenvl/dora_qwenvl/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,15 @@ def main():
event_type = event["type"]

if event_type == "INPUT":

# TODO: Remove this after https://github.com/dora-rs/dora/pull/652
while True:
next_event = node.next(timeout=0.001)
if next_event is not None and next_event["type"] == "INPUT":
event = next_event
else:
break

event_id = event["id"]

if "image" in event_id:
Expand Down

0 comments on commit edc1467

Please sign in to comment.