跳到正文
DEV Community· AI Predictions Dev·· 2 小時前AI 評分52

Studio 如何以視覺模型檢查畫格:攔截了甚麼、漏過了甚麼

A vision model as a frame checker: what it caught and what it let through

AI 導讀

Studio 會先把每張生成圖片交由視覺模型檢查,遇到文字、浮水印、標誌、變形的人體部位或損壞圖片便拒收並重新繪製。四張樣本中,三張乾淨圖片(包括書架場景)通過,帶有「SALE 50% OFF」的圖片因文字被拒,重繪後通過,共繪製兩次。每次檢查耗時 3 至 14 秒;作者指出四張圖片只用來檢查流程接線,不能視為統計結果,模型亦可能漏掉小瑕疵或錯拒圖片。

正文

Cover image for A vision model as a frame checker: what it caught and what it let through

AI Predictions Dev

Image models write fake words on signs, add watermarks and give people too many fingers. A bad frame found after the render costs a re-render; found before, it costs one redraw. So every picture Studio draws is shown to a vision model first.

How the check works

Each frame is scaled down to a JPEG of at most 1,024 pixels on its long side and sent with one instruction: answer only with JSON, ok true or false plus a list of problems, and say false for any written text, letters, numbers, watermark or logo, or for deformed hands, faces or bodies, or a broken image. A rejected frame is drawn again with a new seed, up to a limit you set. If no draw passes, the job stops with the reasons rather than publish a broken frame. A frame that is a flat colour, or the black square some safety filters return, is rejected before the model is even asked.

The test

We used the same local model that writes our scripts, served by vLLM on our own machine, and gave it four pictures that our image model had made earlier: a cup of coffee on a wooden table, an apple on a white background, a person on the phone in front of a bookshelf, and the coffee picture with "SALE 50% OFF" written across it.

  • The three clean pictures passed, including the bookshelf, whose book spines we had expected to trigger a false alarm.
  • The picture with the slogan was rejected, with the reason "written text".
  • In the full loop, the slogan frame came first, was rejected, and the redraw passed: two draws for that scene.

Each check took 3 to 14 seconds, on a model that was busy with other work at the time.

What it does not do

A vision model is a second pair of eyes, not a guarantee. It can miss a small artefact, and a strict instruction will sometimes reject a picture you would have kept, which costs a redraw rather than a bad video. Four pictures are a check of the wiring, not a statistic. Watch your first videos yourself, and tighten or loosen the redraw limit with what you see.

Studio runs this check with any model your server exposes with image input; leave the vision setting empty and the check is off.


First published in the LightsOut Factory field notes: what we learn running our own automation, written down as we go.

來源:DEV Community · dev.to