Import what you already have
Editor v0.4, workflow v1, and API/prompt JSON import into Graph IR. Node ids, titles, modes, and integers past 2^53 survive.
Convert a workflow
Stop hand-editing workflow JSON. Import an existing graph or author one in TypeScript, compile it deterministically, package it, and run it anywhere Comfy runs.
Typed composition, not pseudo-code
import { workflow } from "@stepupgaming/comfy-workflows";
import { conditioning, image, latent, loaders, sampling } from "@stepupgaming/comfy-workflows/nodes";
const g = workflow("t2i");
const ckpt = g.add(loaders.CheckpointLoaderSimple, {
ckpt_name: "v1-5-pruned-emaonly.safetensors",
});
const pos = g.add(conditioning.CLIPTextEncode, { text: "a red cube", clip: ckpt.CLIP });
const lat = g.add(latent.EmptyLatentImage, { width: 512, height: 512, batch_size: 1 });
const ks = g.add(sampling.KSampler, {
model: ckpt.MODEL,
positive: pos.CONDITIONING,
negative: pos.CONDITIONING,
latent_image: lat.LATENT,
seed: 42n,
steps: 20,
cfg: 7,
sampler_name: "euler",
scheduler: "normal",
denoise: 1,
});
const dec = g.add(latent.VAEDecode, { samples: ks.LATENT, vae: ckpt.VAE });
g.add(image.SaveImage, { images: dec.IMAGE, filename_prefix: "t2i" });TypeScript is what you edit · Graph IR is the semantic document · Comfy JSON is a build artifact