Browse Source

Add next call loop in qwenvl2 to queue fix

tags/v0.3.7rc0
haixuanTao 1 year ago
parent
commit
edc1467612
2 changed files with 10 additions and 1 deletions
  1. +1
    -1
      examples/vlm/dataflow.yml
  2. +9
    -0
      node-hub/dora-qwenvl/dora_qwenvl/main.py

+ 1
- 1
examples/vlm/dataflow.yml View File

@@ -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


+ 9
- 0
node-hub/dora-qwenvl/dora_qwenvl/main.py View File

@@ -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:


Loading…
Cancel
Save