Skip to content

v8.7 might be incompatible with smolvlm2-captioner v1.0 #393

Closed

Description

@owencking

Bug Description

I am not sure whether this issue belongs with this repo or the repo for the smolvlm2-captioner app.

When I create a first round of annotations with v8.7 and then run the captioner on those annotations, the captioner crashes. However, this problem does not occur with v8.6.

Here is the stderr output from the smolvlm2-captioner when running on input MMIF from SWT v8.7:

Traceback (most recent call last):
  File "/app/cli.py", line 88, in <module>
    out_mmif = clamsapp.annotate(in_data, **params)
  File "/usr/local/lib/python3.10/site-packages/clams/app/__init__.py", line 235, in annotate
    return annotated.serialize(pretty=pretty, sanitize=True)
  File "/usr/local/lib/python3.10/site-packages/mmif/serialize/mmif.py", line 229, in serialize
    self.generate_capital_annotations()
  File "/usr/local/lib/python3.10/site-packages/mmif/serialize/mmif.py", line 393, in generate_capital_annotations
    view_to_write.new_annotation(AnnotationTypes.Annotation, **props)
  File "/usr/local/lib/python3.10/site-packages/mmif/serialize/view.py", line 183, in new_annotation
    return self.add_annotation(new_annotation, overwrite)
  File "/usr/local/lib/python3.10/site-packages/mmif/serialize/view.py", line 204, in add_annotation
    self.annotations.append(annotation, overwrite)
  File "/usr/local/lib/python3.10/site-packages/mmif/serialize/view.py", line 583, in append
    super()._append_with_key(value.id, value, overwrite)
  File "/usr/local/lib/python3.10/site-packages/mmif/serialize/model.py", line 527, in _append_with_key
    raise KeyError(f"Key {key} already exists")
KeyError: 'Key v_1:an_1 already exists'

The odd thing is that the MMIF output from SWT v8.6 and v8.7 are very similar. Here is a diff:

20c20
<           "runningTime": "0:01:17.805644"
---
>           "runningTime": "0:01:17.524690"
22,23c22,23
<         "timestamp": "2026-07-04T13:46:28.434328",
<         "app": "http://apps.clams.ai/swt-detection/v8.6",
---
>         "timestamp": "2026-07-04T13:58:26.343627",
>         "app": "http://apps.clams.ai/swt-detection/v8.7",
75346c75346
<           "runningTime": "0:01:17.805644"
---
>           "runningTime": "0:01:17.524690"
75348,75349c75348,75349
<         "timestamp": "2026-07-04T13:46:28.434328",
<         "app": "http://apps.clams.ai/swt-detection/v8.6",
---
>         "timestamp": "2026-07-04T13:58:26.343627",
>         "app": "http://apps.clams.ai/swt-detection/v8.7",
75352a75353,75354
>               "chyron and person",
>               "other text",
75354,75355d75355
<               "credits",
<               "slate",
75357a75358
>               "slate",
75359,75360c75360
<               "other text",
<               "chyron and person"
---
>               "credits"
79535,79536c79535,79536
<             "frameCount": 51248,
<             "duration": 1709975,
---
>             "frameCount": 51248.0,
>             "duration": 1709977.0,

The only difference that seems potentially significant is the datatype for frameCount and duration. Intuitively, frameCount should be a whole number, right?

Reproduction steps

Run v8.6 followed by smolvlm2-captioner v1.0 --> Success!

With the same settings, running v8.7 followed by smolvlm2-captioner v1.0 --> crash

Expected behavior

No response

Log output

Screenshots

No response

Additional context

No response

Activity

  1. keighrim commented on Jul 6, 2026

    @keighrim
    Member

    This is actually a SDK bug, introduced by replacing cv2 with pyav(+ffmpeg) for video metadata loading to fix #390

  2. moved this from Todo to Done in appson Jul 6, 2026
  3. moved this from Todo to Done in infraon Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐛BSomething isn't working

    Type

    No type

    Projects

    • Status
      Done
    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions