SD3.5 Large Depth - After
SD3.5 Large Depth - Before

This workflow teaches you how to guide Stable Diffusion 3.5 with a depth map so your generations respect the structure and perspective of a reference image. It loads the SD 3.5 Large checkpoint (sd3.5_large_fp8_scaled.safetensors) with CheckpointLoaderSimple and a high‑quality VAE (vae-ft-mse-840000-ema-pruned.safetensors). Your text prompt is encoded by CLIPTextEncode, and KSampler handles diffusion using a latent canvas defined by EmptySD3LatentImage, so you can set an exact output size. VAEDecode, PreviewImage, and SaveImage complete the loop so you can inspect and export results.

Depth guidance is provided through ControlNet. ControlNetLoader loads sd3.5_large_controlnet_depth.safetensors and ControlNetApplyAdvanced attaches the depth conditioning to your prompt with adjustable strength and start/end percentage. The reference image comes in via LoadImage, is optionally resized with ImageScaleToTotalPixels, and then converted to a depth map by the included depth preprocessor node (the custom node identified by 6b0ed7ac-f476-44c9-9dad-b3f23ef985f8) using the lotus-depth-d-v1-1.safetensors model. For image-to-image variants, VAEEncode can seed KSampler with the reference image latents; for pure text-to-image with depth guidance, use EmptySD3LatentImage. ConditioningZeroOut is available if you want an empty negative prompt. This combination makes it easy to preserve scene layout while freely changing style, lighting, and details with your prompt.

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.

sd3.5_large_depth.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 "SD3.5 Large Depth" (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("sd3.5_large_depth_api.json");

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

wf.setInput("57", "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