Nodes/ComfyUI/Recraft Replace Background
ComfyUI Node Runs on cloud

Recraft Replace Background

Swap the backdrop with a sentence, keep the subject

By Comfy-Org·Created 4 years ago·Updated 32 minutes ago· 129,926
Recraft Replace Background
  • image
  • recraft_style
  • IMAGE
prompt
n1
seed0
negative_prompt

You have a product shot on a white studio background and you want the same product on a beach at golden hour. Describe the beach, hit run, done. That's Recraft Replace Background: it separates your subject from the old backdrop and re-renders the background from your prompt, keeping the foreground intact.

This is the natural next step after Recraft Remove Background, and it's worth understanding the difference in effort. Remove background is fully automatic - one input, no thinking required. Replace background is the version that asks for a prompt, and the quality of your sentence is the quality of your new scene. Be specific: "warm golden-hour beach, soft waves, no people" beats "beach." The model is doing a real scene-rebuild back there, not a lazy gradient fill.

Inputs that matter

  • image - what you're re-backgrounding
  • prompt - multiline, describes the new background
  • n - 1 to 6 variations
  • seed - determines re-run, but results stay nondeterministic regardless (their words, not mine)
  • optional recraft_style - a RECRAFT_V3_STYLE from the style nodes, applied to the generated background
  • optional negative_prompt - "no people, no text" and so on

There's no strength slider here. Unlike the Image to Image node, you don't get to dial how much the model respects the source - the subject is protected by the segmentation, the background is free game. Output is a plain IMAGE.

How it works

Hosted, like the rest of the Recraft family: your image and prompt go to /proxy/recraft/images/replaceBackground, the cutout-and-regenerate happens on Recraft's side, and the result comes back as a tensor. Billed per image from your Comfy account credits. No local GPU, no model files.

Common issues

  • Subject bleed. If the subject has tricky edges (fine hair, transparent glass), the background generation can bleed into it. Check the silhouette - this is the same edge-quality frontier that every background tool lives on.
  • Style overreach. A strong recraft_style applied to a background can end up re-styling the subject too, or fight with a photoreal subject. If the subject looks off, drop to the default realistic style before you blame the prompt.
  • Negative prompt is your friend here. Two words - "no people" - save you from a portrait shoot where a stranger suddenly appears behind the subject.

Where this shines is e-commerce and concept mockups, where you have one clean subject and need it on twenty different backdrops without re-shooting. That's a repetitive, high-value use case that local ComfyUI workflows can't do in one node, and the hosted version is genuinely convenient. For a one-off with a simple background, the free local route - segment, erase, composite - still exists if you'd rather not spend the credits.

Categorypartner/image/Recraft

Inputs (6)

NameTypeDefaultDescription
imageIMAGE
promptSTRINGPrompt for the image generation.
nINT11–6The number of images to generate.
seedINT00–18446744073709550000Seed to determine if node should re-run; actual results are nondeterministic regardless of seed.
recraft_styleoptRECRAFT_V3_STYLE
negative_promptoptSTRINGAn optional text description of undesired elements on an image.

Outputs (1)

NameTypeDescription
IMAGEIMAGE