HiDream E1 Image Edit - After
HiDream E1 Image Edit - Before

The HiDream E1 Image Edit workflow is designed to facilitate professional-grade image editing using natural language prompts. At its core, this workflow leverages the HiDream model, a powerful tool for transforming images based on user input. The process begins with loading the necessary models using nodes like UNETLoader and VAELoader, which are crucial for understanding and generating image data. The CLIPTextEncode node plays a significant role in interpreting the natural language prompts provided by the user, which are then used to guide the image editing process. The workflow also includes nodes such as KSamplerSelect and DualCFGGuider, which help refine the image generation process by adjusting sampling and guidance parameters.

This workflow is particularly useful for users who want to edit images in a highly intuitive manner, simply by describing the desired changes in natural language. For instance, users can prompt the model to add specific elements or styles to an image, such as adding VR glasses to a character in a futuristic setting. The workflow's ability to scale images to a standard 768x768 resolution ensures consistent quality across outputs. By combining advanced image processing nodes with user-friendly natural language inputs, the HiDream E1 Image Edit workflow offers a seamless and powerful image editing experience.

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.

hidream_e1_full.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 "HiDream E1 Image Edit" (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("hidream_e1_full_api.json");

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

wf.setInput("6", "text", "your prompt here"); // 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