Browse Source

Add support for multi-image inference

tags/v0.3.7rc0
haixuanTao 1 year ago
parent
commit
c99dcf5c30
1 changed files with 6 additions and 6 deletions
  1. +6
    -6
      node-hub/dora-qwenvl/dora_qwenvl/main.py

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

@@ -127,27 +127,27 @@ def main():
frames[event_id] = Image.fromarray(frame)

elif event_id == "tick":
if frame is None:
if len(frames.keys()) == 0:
continue
response = generate(frame, question)
response = generate(frames, question)
node.send_output(
"tick",
pa.array([response]),
metadata,
{},
)

elif event_id == "text":
text = event["value"][0].as_py()
if text != "":
question = text
if frame is None:
if len(frames.keys()) == 0:
continue
# set the max number of tiles in `max_num`
response = generate(frame, question)
response = generate(frames, question)
node.send_output(
"text",
pa.array([response]),
metadata,
{},
)

elif event_type == "ERROR":


Loading…
Cancel
Save