Qwen3.5: Text Generation

This workflow demonstrates how to use Qwen3.5 inside ComfyUI to analyze an image and generate descriptive text that doubles as ready-to-use prompts. It performs both image captioning and reverse prompt engineering: you provide an image via LoadImage, and the TextGenerate node, powered by Qwen3.5, returns structured descriptions or prompt candidates you can paste into your image-generation pipelines.

Technically, the CLIPLoader node is pointed at the Qwen3.5 weights (qwen3.5_4b_bf16.safetensors) stored under models/text_encoders/. That model handle feeds into the TextGenerate node, which accepts the loaded image and an instruction prompt (for example, "Produce 3 concise, diffusion-ready prompts"). The node then runs inference and returns text, which you can view with PreviewAny. A MarkdownNote in the graph provides inline guidance and prompt tips, making it easy to iterate on instruction wording, temperature, and token length to dial in results.

API

Use this workflow from code

Every Comfy workflow is a JSON graph. The payload below is this workflow, exactly as ComfyUI runs it — fetch it from the URL, keep it in version control, or load it in ComfyUI and run it node by node.

GET https://comfy.org/workflows/download/aeb71e383642.json
Fetching workflow JSON…

Run it from Python or TypeScript with the Comfy SDK. The same code targets Comfy Cloud or a ComfyUI you host yourself — only the base URL changes.

# Install (beta)
pip install comfy-sdk        # Python
npm i @comfyorg/sdk          # TypeScript

# Run this workflow (Python)
from comfy_sdk import Comfy

client = Comfy(api_key="comfyui-...")
wf = client.workflows.from_file("workflow_api.json")
job = client.run(wf)
for output in job.get_outputs("<output-node-id>"):
    output.to_file(output.name)

The SDK takes a workflow in API format: open this workflow in ComfyUI and use File → Export Workflow (API). API access requires a Comfy Cloud plan with an API key. SDK docs · Get an API key

FAQ

Frequently Asked Questions

View all workflows
Character
Cinematic
Image to Video
Lip Sync
Multiple Angles
Portrait
Style Reference
Style Transfer
Text to Video
Video Generation
Video
Showing 30 of 30 templates