Skip to content

SAMTok Infinite generation? #137

@bksuh

Description

@bksuh

Hi, thanks for the great work on SAMTok!

I've been running SAMTok on outdoor campus scenes and encountered a captioning failure that I'd like to report.

Problem

On certain scenes (outdoor campus with multiple visually similar objects like trash cans and poles), the caption model produces degenerate output — repeating the same object description (e.g., "A dark-colored, rectangular trash can with a hinged lid") dozens of times without terminating properly. -> (attached Log below)

Originally, caption generation runs only once. I added a retry wrapper that checks for malformed output and regenerates, but the model deterministically produces the same broken output on every attempt (tested up to 18 retries with identical results).

Possible upstream cause?

I found that Qwen3-VL and Qwen2.5-VL have a known infinite repetition bug reported across multiple issues:

The Qwen team recommends avoiding greedy decoding and using temperature=0.6, top_p=0.95, top_k=20 to mitigate this.

Is the issue I'm seeing the same root cause as the above Qwen-VL repetition bug? If so, would adjusting the decoding parameters in SAMTok's caption generation config be a viable fix?

Questions

  1. What decoding parameters does SAMTok currently use for caption generation (temperature, top_p, repetition_penalty, etc.)?
  2. Has this type of scene-level repetition been observed before during development?
  3. Any recommended workaround — e.g., adjusting sampling config, or adding a post-processing step to detect and truncate repetitions?

Thank you,
Bokeon Suh

Log

Full log (click to expand) ```

current_retry: 14
Still..caption contains multiple tags:

The image captures a section of a university campus featuring a large, open concrete pavement <|mt_start|><|mt_0156|><|mt_0475|><|mt_end|> that shows signs of wear with visible cracks and patches. To the left, a multi-story brick building <|mt_start|><|mt_0030|><|mt_0345|><|mt_end|> with a grid of rectangular windows and a large garage-style entrance dominates the background. Adjacent to the building, a concrete wall <|mt_start|><|mt_0133|><|mt_0453|><|mt_end|> with a vertical blue stripe and a small rectangular opening is visible. In the foreground, a cylindrical metal pole <|mt_start|><|mt_0183|><|mt_0369|><|mt_end|> stands on the pavement, and nearby, a dark-colored cylindrical trash can <|mt_start|><|mt_0183|><|mt_0508|><|mt_end|> is positioned. A dark-colored, rectangular trash can <|mt_start|><|mt_0177|><|mt_0396|><|mt_end|> is also present near the wall. A dark-colored, rectangular vent or grille <|mt_start|><|mt_0069|><|mt_0481|><|mt_end|> is mounted on a structure to the right. A dark-colored, rectangular signboard <|mt_start|><|mt_0209|><|mt_0436|><|mt_end|> with a white border and a red and white logo is mounted on a pole. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0394|><|mt_end|> with a hinged lid is situated near the wall. A dark-colored, rectangular trash can <|mt_start|><|mt_0136|><|mt_0446|><|mt_end|> with a hinged lid is also visible. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is positioned near the wall. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is also present. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is visible. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is also present. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is visible. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is also present. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is visible. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is also present. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is visible. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is also present. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is visible. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is also present. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is visible. A dark
current_retry: 15
Still..caption contains multiple tags:

The image captures a section of a university campus featuring a large, open concrete pavement <|mt_start|><|mt_0156|><|mt_0475|><|mt_end|> that shows signs of wear with visible cracks and patches. To the left, a multi-story brick building <|mt_start|><|mt_0030|><|mt_0345|><|mt_end|> with a grid of rectangular windows and a large garage-style entrance dominates the background. Adjacent to the building, a concrete wall <|mt_start|><|mt_0133|><|mt_0453|><|mt_end|> with a vertical blue stripe and a small rectangular opening is visible. In the foreground, a cylindrical metal pole <|mt_start|><|mt_0183|><|mt_0369|><|mt_end|> stands on the pavement, and nearby, a dark-colored cylindrical trash can <|mt_start|><|mt_0183|><|mt_0508|><|mt_end|> is positioned. A dark-colored, rectangular trash can <|mt_start|><|mt_0177|><|mt_0396|><|mt_end|> is also present near the wall. A dark-colored, rectangular vent or grille <|mt_start|><|mt_0069|><|mt_0481|><|mt_end|> is mounted on a structure to the right. A dark-colored, rectangular signboard <|mt_start|><|mt_0209|><|mt_0436|><|mt_end|> with a white border and a red and white logo is mounted on a pole. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0394|><|mt_end|> with a hinged lid is situated near the wall. A dark-colored, rectangular trash can <|mt_start|><|mt_0136|><|mt_0446|><|mt_end|> with a hinged lid is also visible. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is positioned near the wall. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is also present. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is visible. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is also present. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is visible. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is also present. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is visible. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is also present. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is visible. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is also present. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is visible. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is also present. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is visible. A dark
current_retry: 16
Still..caption contains multiple tags:

The image captures a section of a university campus featuring a large, open concrete pavement <|mt_start|><|mt_0156|><|mt_0475|><|mt_end|> that shows signs of wear with visible cracks and patches. To the left, a multi-story brick building <|mt_start|><|mt_0030|><|mt_0345|><|mt_end|> with a grid of rectangular windows and a large garage-style entrance dominates the background. Adjacent to the building, a concrete wall <|mt_start|><|mt_0133|><|mt_0453|><|mt_end|> with a vertical blue stripe and a small rectangular opening is visible. In the foreground, a cylindrical metal pole <|mt_start|><|mt_0183|><|mt_0369|><|mt_end|> stands on the pavement, and nearby, a dark-colored cylindrical trash can <|mt_start|><|mt_0183|><|mt_0508|><|mt_end|> is positioned. A dark-colored, rectangular trash can <|mt_start|><|mt_0177|><|mt_0396|><|mt_end|> is also present near the wall. A dark-colored, rectangular vent or grille <|mt_start|><|mt_0069|><|mt_0481|><|mt_end|> is mounted on a structure to the right. A dark-colored, rectangular signboard <|mt_start|><|mt_0209|><|mt_0436|><|mt_end|> with a white border and a red and white logo is mounted on a pole. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0394|><|mt_end|> with a hinged lid is situated near the wall. A dark-colored, rectangular trash can <|mt_start|><|mt_0136|><|mt_0446|><|mt_end|> with a hinged lid is also visible. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is positioned near the wall. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is also present. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is visible. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is also present. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is visible. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is also present. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is visible. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is also present. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is visible. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is also present. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is visible. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is also present. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is visible. A dark
current_retry: 17
Still..caption contains multiple tags:

The image captures a section of a university campus featuring a large, open concrete pavement <|mt_start|><|mt_0156|><|mt_0475|><|mt_end|> that shows signs of wear with visible cracks and patches. To the left, a multi-story brick building <|mt_start|><|mt_0030|><|mt_0345|><|mt_end|> with a grid of rectangular windows and a large garage-style entrance dominates the background. Adjacent to the building, a concrete wall <|mt_start|><|mt_0133|><|mt_0453|><|mt_end|> with a vertical blue stripe and a small rectangular opening is visible. In the foreground, a cylindrical metal pole <|mt_start|><|mt_0183|><|mt_0369|><|mt_end|> stands on the pavement, and nearby, a dark-colored cylindrical trash can <|mt_start|><|mt_0183|><|mt_0508|><|mt_end|> is positioned. A dark-colored, rectangular trash can <|mt_start|><|mt_0177|><|mt_0396|><|mt_end|> is also present near the wall. A dark-colored, rectangular vent or grille <|mt_start|><|mt_0069|><|mt_0481|><|mt_end|> is mounted on a structure to the right. A dark-colored, rectangular signboard <|mt_start|><|mt_0209|><|mt_0436|><|mt_end|> with a white border and a red and white logo is mounted on a pole. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0394|><|mt_end|> with a hinged lid is situated near the wall. A dark-colored, rectangular trash can <|mt_start|><|mt_0136|><|mt_0446|><|mt_end|> with a hinged lid is also visible. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is positioned near the wall. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is also present. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is visible. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is also present. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is visible. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is also present. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is visible. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is also present. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is visible. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is also present. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is visible. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is also present. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is visible. A dark
current_retry: 18
Still..caption contains multiple tags:

The image captures a section of a university campus featuring a large, open concrete pavement <|mt_start|><|mt_0156|><|mt_0475|><|mt_end|> that shows signs of wear with visible cracks and patches. To the left, a multi-story brick building <|mt_start|><|mt_0030|><|mt_0345|><|mt_end|> with a grid of rectangular windows and a large garage-style entrance dominates the background. Adjacent to the building, a concrete wall <|mt_start|><|mt_0133|><|mt_0453|><|mt_end|> with a vertical blue stripe and a small rectangular opening is visible. In the foreground, a cylindrical metal pole <|mt_start|><|mt_0183|><|mt_0369|><|mt_end|> stands on the pavement, and nearby, a dark-colored cylindrical trash can <|mt_start|><|mt_0183|><|mt_0508|><|mt_end|> is positioned. A dark-colored, rectangular trash can <|mt_start|><|mt_0177|><|mt_0396|><|mt_end|> is also present near the wall. A dark-colored, rectangular vent or grille <|mt_start|><|mt_0069|><|mt_0481|><|mt_end|> is mounted on a structure to the right. A dark-colored, rectangular signboard <|mt_start|><|mt_0209|><|mt_0436|><|mt_end|> with a white border and a red and white logo is mounted on a pole. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0394|><|mt_end|> with a hinged lid is situated near the wall. A dark-colored, rectangular trash can <|mt_start|><|mt_0136|><|mt_0446|><|mt_end|> with a hinged lid is also visible. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is positioned near the wall. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is also present. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is visible. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is also present. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is visible. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is also present. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is visible. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is also present. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is visible. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is also present. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is visible. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is also present. A dark-colored, rectangular trash can <|mt_start|><|mt_0124|><|mt_0283|><|mt_end|> with a hinged lid is visible. A dark

</details>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions