Edit a source image by instruction with FLUX.2 klein 4B (the distilled 4-step model, bf16) on the RunPod image endpoint, optionally guided by a second reference image, SFW only. Translated from Comfy-Org/workflow_templates@aaac56dd templates/image_flux2_klein_image_edit_4b_distilled.json, whose two subgraphs take one and two images; two is the most the template accepts. Each image goes through ImageScaleToTotalPixels (nearest-exact, 1 MP, resolution_steps 1) and VAEEncode (flux2-vae) into a ReferenceLatent on the positive and another on the zeroed negative, the second image chained after the first; the output takes the scaled source's size through GetImageSize into Flux2Scheduler and EmptyFlux2LatentImage; CFGGuider at CFG 1, KSamplerSelect euler, Flux2Scheduler at 4 steps. The template loads the fp8 transformer; this catalog loads the bf16 file on the volume.
Tags: chromarunpod-serverlessvolume-backedimage-to-imageimage-editflux2-klein
Inputs (5)#
The typed parameter surface callers bind when they request this workflow. Enum options and numeric bounds are the values the workflow document declares.
promptstringrequireddefault Change the bag color to blue.seedintegerdefault -1source_imageimagerequiredreferencesenumdefault oneonetworeference_imageimageComfyUI node graph (24)#
The executable ComfyUI prompt graph: 24 nodes across 18 distinct node classes, wired by 32 data dependencies. Nodes tinted green come from a custom node pack this workflow declares; the rest are ComfyUI core / baked-community classes.
Nodes (24)#
1UNETLoadercoreunet_name = flux-2-klein-4b.safetensorsweight_dtype = defaultMODEL2CLIPLoadercoreclip_name = qwen_3_4b.safetensorstype = flux2device = defaultCLIP3VAELoadercorevae_name = flux2-vae.safetensorsVAE4CLIPTextEncodecoretext = {{constructed_prompt}} tmplclip = ◂ node 2 · out[0]CONDITIONING5ConditioningZeroOutcoreconditioning = ◂ node 4 · out[0]CONDITIONING6LoadImagecoreimage = {{source_image}} tmplIMAGEMASK7ImageScaleToTotalPixelscoreimage = ◂ node 6 · out[0]upscale_method = nearest-exactmegapixels = 1.0resolution_steps = 1IMAGE8VAEEncodecorepixels = ◂ node 7 · out[0]vae = ◂ node 3 · out[0]LATENT9ReferenceLatentcoreconditioning = ◂ node 4 · out[0]latent = ◂ node 8 · out[0]CONDITIONING10ReferenceLatentcoreconditioning = ◂ node 5 · out[0]latent = ◂ node 8 · out[0]CONDITIONING11LoadImagecoreimage = {{reference_image}} tmplIMAGEMASK12ImageScaleToTotalPixelscoreimage = ◂ node 11 · out[0]upscale_method = nearest-exactmegapixels = 1.0resolution_steps = 1IMAGE13VAEEncodecorepixels = ◂ node 12 · out[0]vae = ◂ node 3 · out[0]LATENT14ReferenceLatentcoreconditioning = ◂ node 9 · out[0]latent = ◂ node 13 · out[0]CONDITIONING15ReferenceLatentcoreconditioning = ◂ node 10 · out[0]latent = ◂ node 13 · out[0]CONDITIONING16CFGGuidercoremodel = ◂ node 1 · out[0]positive = ◂ node 14 · out[0]negative = ◂ node 15 · out[0]cfg = 1.0GUIDER17KSamplerSelectcoresampler_name = eulerSAMPLER18GetImageSizecoreimage = ◂ node 7 · out[0]INTINTINT19Flux2Schedulercoresteps = 4width = ◂ node 18 · out[0]height = ◂ node 18 · out[1]SIGMAS20RandomNoisecorenoise_seed = {{seed}} tmplNOISE21EmptyFlux2LatentImagecorewidth = ◂ node 18 · out[0]height = ◂ node 18 · out[1]batch_size = 1LATENT22SamplerCustomAdvancedcorenoise = ◂ node 20 · out[0]guider = ◂ node 16 · out[0]sampler = ◂ node 17 · out[0]sigmas = ◂ node 19 · out[0]latent_image = ◂ node 21 · out[0]LATENTLATENT23VAEDecodecoresamples = ◂ node 22 · out[0]vae = ◂ node 3 · out[0]IMAGE24SaveImagecoreimages = ◂ node 23 · out[0]filename_prefix = isis/klein4b-editPrompt construction#
template{base_prompt}Variables (1)#
base_prompt{{prompt}} tmplParameter banks (1)#
The prompt / configuration lookup tables this workflow keys into from its inputs — the vocabulary that turns a style / palette / preset selection into graph parameters.
requires_families (1)#
klein4bModels & dependencies#
Models required (3)#
flux-2-klein-4b.safetensorsqwen_3_4b.safetensorsflux2-vae.safetensorsOutput contract#
What a successful run of this workflow returns.
typeimageformatpngTaxonomy & routing#
How the control plane classifies this workflow — from the committed workflow-taxonomy-registry.json. It drives the consistency / control surface the agentic director can exercise over the workflow.
assetFamilyportrait-hero-image-bundleoutputPackageProfileimage-single-profilecontrolModalitiesmodel-locksampler-scheduler-lockseed-locklatent-reuseconsistencyDimensionsidentitylightingenvironmentnotesFLUX.2 klein 4B distilled instruction edit with up to two reference images, SFW only.