Nodes/ComfyUI-Qwen3VL-DP/🍭大炮-Qwen3VL对比打标@炮老师的小课堂
ComfyUI Node

🍭大炮-Qwen3VL对比打标@炮老师的小课堂

Before/after folders, one prompt at a time

By paolaoshi·Created 9 months ago·Updated 7 months ago· 117
🍭大炮-Qwen3VL对比打标@炮老师的小课堂
    • 处理结果
    🤖 模型选择Qwen3-VL-4B-Instruct
    ⚙️ 量化级别None (FP16)
    🖼️ 最大长边768
    📁 A文件夹(原始图)
    📂 B文件夹(结果图)
    🌍 语言选择中文
    ✏️ 自定义提示词
    📍 输出位置默认(B文件夹)
    📂 自定义输出文件夹
    🔢 最大令牌数1024
    🌡️ 采样温度0.6
    🎯 核采样参数0.90
    🚀 开启TF32加速false
    🔄 保持模型加载false
    🎲 随机种子-1
    🎯 种子控制随机
    📝 前缀文本
    📌 后缀文本
    🔄 强制覆盖false

    Here's a workflow problem that has no good classic answer: you ran an image through an instruction-edit model - Qwen-Edit, Flux Kontext, anything with a "prompt drives the edit" workflow - and you'd like to know what prompt produced this change. Or you're assembling a training set of edit pairs and need the instruction text for each one. Qwen3VL_Compare_Caption is the pack's node for exactly that: point it at two folders - A for the originals, B for the edited results - and it has Qwen3-VL look at each pair and write a reverse-engineered edit instruction.

    The author built it explicitly for Kontext/Qwen-edit style workflows, and the built-in prompt shows its hand: it tells the model that image 2 is an AI edit of image 1, asks what changed, and demands a directive, prompt-style output with no explanatory fluff. That's a niche but genuinely painful problem, and it's the kind of thing that used to mean hand-writing captions for every pair.

    How it works

    Same engine as the rest of the pack (Qwen3-VL via transformers, auto-downloading models), but the interesting logic is the pairing. It scans both folders, sorts the filenames, and requires a strict one-to-one correspondence - same count, same base names ignoring extension. If folder A has photo_01.png and folder B has photo_01.jpg, they pair; if the names drift or the counts disagree, the node refuses and tells you exactly which positions mismatched. Then each pair goes through the main node's processor with both images attached, and the result is written as a .txt alongside the result image (or to a custom output folder).

    The built-in prompt is available in 中文 or English, and ✏️ 自定义提示词 overrides it entirely if you want a different framing - say, "describe only the changes to composition" or a caption formatted for your trainer. Everything else - model choice, quantization, max tokens, temperature, top-p, TF32, keep-model-loaded, and the seed controls - is shared with the batch node, including the same skip-if-.txt-exists behavior unless 🔄 强制覆盖 is on.

    The inputs that matter

    • 📁 A文件夹(原始图) and 📂 B文件夹(结果图) - both required and both must exist. A is the before, B is the after. The correspondence check is the thing that'll bite you, so make sure the two folders are clean mirrors of each other.
    • 🌍 语言选择 - 中文 or English, which picks the built-in prompt. Use ✏️ 自定义提示词 if neither fits.
    • 📍 输出位置 - 默认(B文件夹) writes each <name>.txt next to the result image; 自定义位置 needs 📂 自定义输出文件夹 filled in.
    • 📝 前缀文本 / 📌 后缀文本 - wrap every generated instruction, handy for a trigger word or a format requirement.
    • 🤖 模型选择 / ⚙️ 量化级别 / 🖼️ 最大长边 - the usual stack; 4B default, keep 最大长边 at 768.
    • 🎲 随机种子 / 🎯 种子控制 - fix the seed if you want to debug why a particular pair came out oddly; random mode also forces overwrite of existing .txt files.

    The 处理结果 output is a run report (matched/processed/skipped counts) - the actual captions live in the .txt files it wrote.

    Installing and troubleshooting

    Pack-wide, via ComfyUI Manager (search ComfyUI-Qwen3VL-DP) or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/paolaoshi/ComfyUI-Qwen3VL-DP
    cd ComfyUI-Qwen3VL-DP
    pip install -r requirements.txt
    

    then restart. The usual suspects apply: transformers >= 4.57.0 or you'll hit the "Transformers does not recognize qwen3_vl architecture" error, FP8 variants want an 8.9-capability GPU, first run downloads several GB.

    The most common failure isn't technical - it's the folder correspondence check rejecting your setup. Rename so both sides share base names, or copy both sets into paired folders first. And set expectations: this node is really good at saying "the sky got more dramatic and the subject was sharpened," which is exactly the reverse-prompt output the author aimed at. Like every VLM, it fumbles fine-grained attribution when a frame has multiple subjects - audit the odd pair by eye before you trust it for a training set.

    Category🍭大炮-Qwen3VL

    Inputs (19)

    NameTypeDefaultDescription
    🤖 模型选择COMBOQwen3-VL-4B-Instruct20 options: Qwen3-VL-2B-Instruct, Qwen3-VL-2B-Thinking, Qwen3-VL-2B-Instruct-FP8, Qwen3-VL-2B-Thinking-FP8, Qwen3-VL-4B-Instruct, Qwen3-VL-4B-Thinking, +14
    ⚙️ 量化级别COMBONone (FP16)3 options: 4-bit (节省显存), 8-bit (平衡), None (FP16)
    🖼️ 最大长边INT768256–2048
    📁 A文件夹(原始图)STRING
    📂 B文件夹(结果图)STRING
    🌍 语言选择COMBO中文2 options: 中文, English
    ✏️ 自定义提示词STRING
    📍 输出位置COMBO默认(B文件夹)2 options: 默认(B文件夹), 自定义位置
    📂 自定义输出文件夹STRING
    🔢 最大令牌数INT102464–4096
    🌡️ 采样温度FLOAT0.60.1–1
    🎯 核采样参数FLOAT0.900–1
    🚀 开启TF32加速BOOLEANfalse启用TF32加速(仅支持Ampere及以上架构显卡,如30/40/50系,能显著提升速度)
    🔄 保持模型加载BOOLEANfalse
    🎲 随机种子INT-1-1–18446744073709550000随机种子,-1为随机
    🎯 种子控制COMBO随机3 options: 随机, 固定, 递增
    📝 前缀文本STRING
    📌 后缀文本STRING
    🔄 强制覆盖BOOLEANfalse启用后会覆盖已存在的txt文件

    Outputs (1)

    NameTypeDescription
    处理结果STRING