SDXL Revision Text Prompts

The SDXL Revision Text Prompts workflow is designed to generate high-quality images by effectively transferring concepts from reference images using the SDXL model. This workflow leverages a series of nodes to process both textual and visual inputs, allowing for nuanced image creation based on specific prompts. At its core, it uses the CLIPTextEncode node to interpret text prompts and the CLIPVisionEncode node to analyze reference images. The KSampler node is crucial in synthesizing the final image by sampling from the latent space informed by both text and image inputs. The VAEDecode node then decodes this latent representation into a visible image, which can be saved using the SaveImage node. This workflow is particularly useful for artists and designers who wish to incorporate specific styles or elements from reference images into new creations, offering a seamless blend of textual and visual inspiration.

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.

sdxl_revision_text_prompts.json
Fetching workflow JSON…

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

// Install (beta)
npm i @comfyorg/sdk

// Run "SDXL Revision Text Prompts" (TypeScript)
import { Comfy } from "@comfyorg/sdk";

const client = new Comfy({ apiKey: "comfyui-..." });

// This workflow, exported in API format (see note below)
const wf = await client.workflows.fromFile("sdxl_revision_text_prompts_api.json");

const asset = client.assets.fromFile("input.png");
wf.setInput("34", "image", asset); // LoadImage

wf.setInput("7", "text", "text, watermark"); // CLIPTextEncode

const job = await client.run(wf);
await job.getOutputs("9")[0].toFile("output.png"); // SaveImage

The SDK takes a workflow in API format: open this workflow in ComfyUI and use File → Export Workflow (API).

Comfy Cloud API access requires a plan with an API key.

FAQ

Frequently Asked Questions

View all workflows
Showing 30 of 30 templates