Runway: Reference to Image - After
Runway: Reference to Image - Before

This ComfyUI workflow, titled 'Runway: Reference to Image,' empowers users to generate new images by leveraging reference styles and compositions through Runway's AI capabilities. At its core, the workflow utilizes the RunwayTextToImageNode, which is specifically designed to transform textual descriptions into visual content. This node is complemented by the LoadImage node, which allows users to input a reference image that guides the style and composition of the generated output. The SaveImage node ensures that the resulting images can be efficiently stored for future use. Additionally, MarkdownNote nodes are included to provide users with helpful annotations and guidance throughout the workflow.

The technical foundation of this workflow is built upon the integration of Runway's AI models, which are renowned for their ability to interpret and recreate artistic styles. This makes the workflow particularly useful for artists, designers, and content creators who wish to explore variations of existing images or experiment with new visual concepts. By utilizing a secure network environment, as outlined in the author notes, users can seamlessly connect to Runway's API, ensuring a smooth and secure image generation process.

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.

api_runway_reference_to_image.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 "Runway: Reference to Image" (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("api_runway_reference_to_image_api.json");

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

const job = await client.run(wf);
await job.getOutputs("6")[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