{ "id": "bf5a8045-f22e-4f94-b752-658edd7c62fd", "revision": 0, "last_node_id": 13, "last_link_id": 8, "nodes": [ { "id": 9, "type": "MarkdownNote", "flags": {}, "order": 1, "mode": 0, "inputs": [], "outputs": [], "properties": {}, "widgets_values": [ "## Image2Text (local ComfyUI)\n\nDescribes an image in enough detail that the reply works as a text-to-image prompt. Built on ComfyUI's template **Qwen3-VL: Text Generation** ([#14298](https://github.com/Comfy-Org/ComfyUI/pull/14298)), with a system prompt for prompt-ready descriptions. ComfyUI's own nodes only.\n\n**Setup (once)**\n- **ComfyUI 0.39 or newer.**\n- **Model:** when you open the workflow, ComfyUI offers to download it if it's missing (Load CLIP carries its link). To get it yourself → `models/text_encoders/`: [qwen3vl_4b_bf16.safetensors](https://huggingface.co/Comfy-Org/Qwen3-VL/resolve/main/text_encoders/qwen3vl_4b_bf16.safetensors) (8.9 GB; the same file as Krea 2's text encoder). Smaller, for NVIDIA GPUs: [qwen3vl_4b_fp8_scaled.safetensors](https://huggingface.co/Comfy-Org/Qwen3-VL/resolve/main/text_encoders/qwen3vl_4b_fp8_scaled.safetensors) (5.2 GB).\n- **Apple Silicon Mac:** the MLX version, `Image2Text-ComfyUI-local-MLX.json`, runs the same model about 3x faster.\n\n**How to use** (in the App view; the same fields are in this graph)\n- **Image**: the picture to describe.\n- **System prompt**: how to describe it, for every image. Edit it to change the kind of description.\n- **Prompt**: your request for this image. The default asks for the description only; add a focus such as *Focus on the clothing.*\n- **Max length**: the longest reply, in tokens (1024 ≈ 750 words).\n- **Seed**: another seed, another wording; the same seed repeats the reply.\n- **Description** (Preview as Text): the reply, ready to copy. It's also the run's result in the App view, next to the image, and saved as a text file in ComfyUI's output folder (`Image2Text/description_….txt`).\n- **Markdown** (the switch above Description, `preview_mode` on Comfy Cloud): on, Markdown in the reply (bold, lists, headings) is rendered; off, the plain text.\n\n**Model** (Load CLIP)\n- Any vision model ComfyUI generates with: Qwen3-VL 4B / 8B, Qwen3.5 / 3.6 / 3.8, Gemma 4 E2B / E4B / 31B, Gemma 3 12B. Comfy-Org's files: [Qwen3-VL](https://huggingface.co/Comfy-Org/Qwen3-VL/tree/main/text_encoders), [Gemma 4](https://huggingface.co/Comfy-Org/gemma-4/tree/main/text_encoders).\n- Leave Load CLIP's **type** as it is: it only matters when the file serves an image model as its text encoder.\n- With LVNodes on an Apple Silicon Mac, Qwen3.5 / 3.6 / 3.8 and Gemma 4 files run on MLX here too.\n" ], "color": "#432", "bgcolor": "#653", "pos": [ -150, 190 ], "size": [ 570, 1050 ] }, { "id": 5, "type": "CLIPLoader", "pos": [ 460, 190 ], "size": [ 520, 114 ], "flags": {}, "order": 0, "mode": 0, "inputs": [ { "localized_name": "clip_name", "name": "clip_name", "type": "COMBO", "widget": { "name": "clip_name" }, "link": null, "label": "Model" }, { "localized_name": "type", "name": "type", "type": "COMBO", "widget": { "name": "type" }, "link": null }, { "localized_name": "device", "name": "device", "type": "COMBO", "widget": { "name": "device" }, "link": null, "shape": 7 } ], "outputs": [ { "localized_name": "CLIP", "name": "CLIP", "type": "CLIP", "links": [ 2 ] } ], "properties": { "cnr_id": "comfy-core", "ver": "0.39.0", "Node name for S&R": "CLIPLoader", "models": [ { "name": "qwen3vl_4b_bf16.safetensors", "url": "https://huggingface.co/Comfy-Org/Qwen3-VL/resolve/main/text_encoders/qwen3vl_4b_bf16.safetensors", "directory": "text_encoders" } ] }, "widgets_values": [ "qwen3vl_4b_bf16.safetensors", "ideogram4", "default" ] }, { "id": 10, "type": "PrimitiveStringMultiline", "title": "System prompt", "flags": {}, "order": 2, "mode": 0, "inputs": [ { "localized_name": "value", "name": "value", "type": "STRING", "widget": { "name": "value" }, "link": null, "label": "System prompt" } ], "outputs": [ { "localized_name": "STRING", "name": "STRING", "type": "STRING", "links": [ 5 ] } ], "properties": { "cnr_id": "comfy-core", "ver": "0.39.0", "Node name for S&R": "PrimitiveStringMultiline" }, "widgets_values": [ "Describe the attached image in such a detail that if the description was to be given as a text to image prompt it would generate the same or very close result. If there are multiple subjects, describe their interactions and placements in the frame. If there are human or animal subjects, describe their anatomy, pose, facial expression in detail. Be very detailed and descriptive. Do not include any of my instructions to you in the reply." ], "pos": [ 460, 356 ], "size": [ 520, 238 ] }, { "id": 12, "type": "PrimitiveInt", "title": "Seed", "flags": {}, "order": 3, "mode": 0, "inputs": [ { "localized_name": "value", "name": "value", "type": "INT", "widget": { "name": "value" }, "link": null, "label": "Seed" } ], "outputs": [ { "localized_name": "INT", "name": "INT", "type": "INT", "links": [ 6 ] } ], "properties": { "cnr_id": "comfy-core", "ver": "0.39.0", "Node name for S&R": "PrimitiveInt" }, "widgets_values": [ 0, "fixed" ], "pos": [ 460, 646 ], "size": [ 520, 82 ] }, { "id": 8, "type": "LoadImage", "flags": {}, "order": 4, "mode": 0, "inputs": [ { "localized_name": "image", "name": "image", "type": "COMBO", "widget": { "name": "image" }, "link": null, "label": "Image" }, { "localized_name": "choose file to upload", "name": "upload", "type": "IMAGEUPLOAD", "widget": { "name": "upload" }, "link": null } ], "outputs": [ { "localized_name": "IMAGE", "name": "IMAGE", "type": "IMAGE", "links": [ 4, 7 ] }, { "localized_name": "MASK", "name": "MASK", "type": "MASK", "links": null } ], "properties": { "cnr_id": "comfy-core", "ver": "0.39.0", "Node name for S&R": "LoadImage" }, "widgets_values": [ "", "image" ], "pos": [ 460, 780 ], "size": [ 520, 460 ] }, { "id": 6, "type": "TextGenerate", "pos": [ 1020, 190 ], "size": [ 420, 538 ], "flags": {}, "order": 3, "mode": 0, "inputs": [ { "localized_name": "clip", "name": "clip", "type": "CLIP", "link": 2 }, { "localized_name": "image", "name": "image", "shape": 7, "type": "IMAGE", "link": 4 }, { "localized_name": "video", "name": "video", "shape": 7, "type": "IMAGE", "link": null }, { "localized_name": "audio", "name": "audio", "shape": 7, "type": "AUDIO", "link": null }, { "localized_name": "system_prompt", "name": "system_prompt", "shape": 7, "type": "STRING", "link": 5 }, { "localized_name": "prompt", "name": "prompt", "type": "STRING", "widget": { "name": "prompt" }, "link": null, "label": "Prompt" }, { "localized_name": "max_length", "name": "max_length", "type": "INT", "widget": { "name": "max_length" }, "link": null, "label": "Max length" }, { "localized_name": "Sampling Mode", "name": "sampling_mode", "type": "COMFY_DYNAMICCOMBO_V3", "widget": { "name": "sampling_mode" }, "link": null }, { "localized_name": "temperature", "name": "sampling_mode.temperature", "type": "FLOAT", "widget": { "name": "sampling_mode.temperature" }, "link": null }, { "localized_name": "top_k", "name": "sampling_mode.top_k", "type": "INT", "widget": { "name": "sampling_mode.top_k" }, "link": null }, { "localized_name": "top_p", "name": "sampling_mode.top_p", "type": "FLOAT", "widget": { "name": "sampling_mode.top_p" }, "link": null }, { "localized_name": "min_p", "name": "sampling_mode.min_p", "type": "FLOAT", "widget": { "name": "sampling_mode.min_p" }, "link": null }, { "localized_name": "repetition_penalty", "name": "sampling_mode.repetition_penalty", "type": "FLOAT", "widget": { "name": "sampling_mode.repetition_penalty" }, "link": null }, { "localized_name": "seed", "name": "sampling_mode.seed", "type": "INT", "widget": { "name": "sampling_mode.seed" }, "link": 6 }, { "localized_name": "presence_penalty", "name": "sampling_mode.presence_penalty", "type": "FLOAT", "widget": { "name": "sampling_mode.presence_penalty" }, "link": null, "shape": 7 }, { "localized_name": "thinking", "name": "thinking", "type": "BOOLEAN", "widget": { "name": "thinking" }, "link": null, "shape": 7 }, { "localized_name": "use_default_template", "name": "use_default_template", "type": "BOOLEAN", "widget": { "name": "use_default_template" }, "link": null, "shape": 7 }, { "localized_name": "mtp", "name": "mtp", "type": "COMBO", "widget": { "name": "mtp" }, "link": null, "shape": 7 } ], "outputs": [ { "localized_name": "generated_text", "name": "generated_text", "type": "STRING", "links": [ 3, 8 ] }, { "localized_name": "thinking", "name": "thinking", "type": "STRING", "links": null } ], "properties": { "cnr_id": "comfy-core", "ver": "0.39.0", "Node name for S&R": "TextGenerate" }, "widgets_values": [ "Describe this image. Reply with the description only.", 1024, "on", 0.7, 64, 0.95, 0.05, 1.05, 0, 0, false, true, "auto" ] }, { "id": 7, "type": "PreviewAny", "flags": {}, "order": 5, "mode": 0, "inputs": [ { "localized_name": "source", "name": "source", "type": "*", "link": 3 } ], "outputs": [ { "localized_name": "STRING", "name": "STRING", "type": "STRING", "links": null } ], "properties": { "cnr_id": "comfy-core", "ver": "0.39.0", "Node name for S&R": "PreviewAny", "App panel label": "Description", "App panel reveal": true, "Render Markdown": true }, "widgets_values": [], "pos": [ 1480, 190 ], "size": [ 620, 538 ] }, { "id": 11, "type": "PreviewImage", "flags": {}, "order": 6, "mode": 0, "inputs": [ { "localized_name": "images", "name": "images", "type": "IMAGE", "link": 7 } ], "outputs": [], "properties": { "cnr_id": "comfy-core", "ver": "0.39.0", "Node name for S&R": "PreviewImage" }, "widgets_values": [], "pos": [ 1020, 780 ], "size": [ 420, 460 ] }, { "id": 13, "type": "SaveText", "title": "Description (shown in the app)", "flags": {}, "order": 7, "mode": 0, "inputs": [ { "localized_name": "text", "name": "text", "type": "STRING", "link": 8 }, { "localized_name": "filename_prefix", "name": "filename_prefix", "type": "STRING", "widget": { "name": "filename_prefix" }, "link": null }, { "localized_name": "format", "name": "format", "type": "COMBO", "widget": { "name": "format" }, "link": null } ], "outputs": [ { "localized_name": "STRING", "name": "STRING", "type": "STRING", "links": null } ], "properties": { "cnr_id": "comfy-core", "ver": "0.39.0", "Node name for S&R": "SaveText", "Render Markdown": true }, "widgets_values": [ "Image2Text/description", "txt" ], "pos": [ 1480, 780 ], "size": [ 620, 460 ] } ], "links": [ [ 2, 5, 0, 6, 0, "CLIP" ], [ 3, 6, 0, 7, 0, "STRING" ], [ 4, 8, 0, 6, 1, "IMAGE" ], [ 5, 10, 0, 6, 4, "STRING" ], [ 6, 12, 0, 6, 13, "INT" ], [ 7, 8, 0, 11, 0, "IMAGE" ], [ 8, 6, 0, 13, 0, "STRING" ] ], "groups": [], "config": {}, "extra": { "ds": { "scale": 0.7, "offset": [ 260, -40 ] }, "frontendVersion": "1.55.14", "linearMode": true, "linearData": { "inputs": [ [ "bf5a8045-f22e-4f94-b752-658edd7c62fd:5:clip_name", "clip_name", { "description": "Qwen3-VL 4B by default · any vision LLM" } ], [ "bf5a8045-f22e-4f94-b752-658edd7c62fd:8:image", "image", { "description": "The picture to describe" } ], [ "bf5a8045-f22e-4f94-b752-658edd7c62fd:10:value", "value", { "description": "How to describe it, for every image", "height": 160 } ], [ "bf5a8045-f22e-4f94-b752-658edd7c62fd:6:prompt", "prompt", { "description": "Your request · add a focus if you like", "height": 90 } ], [ "bf5a8045-f22e-4f94-b752-658edd7c62fd:6:max_length", "max_length", { "description": "Longest reply in tokens · 1024 ≈ 750 words" } ], [ "bf5a8045-f22e-4f94-b752-658edd7c62fd:12:value", "value", { "description": "Another seed, another wording", "height": 160 } ], [ "bf5a8045-f22e-4f94-b752-658edd7c62fd:7:preview_mode", "preview_mode", { "description": "On: Markdown · Off: plain text" } ], [ "bf5a8045-f22e-4f94-b752-658edd7c62fd:7:preview_text", "preview_text", { "description": "The description · fills in after each run", "height": 420 } ] ], "outputs": [ 13, 11 ] } }, "version": 0.4 }