Skip to content
WorkflowListedExternal
Open source

Img2img Replace Background

This workflow will replace the background of an image and allow you to alter the colors, flip, flop or morph the background, foreground and output images.

TaskImage to imageEstimated VRAMNot yet characterizedBgrade

Runtime profile

Access
External workflow
Status
Listed
Source
Civitai
Updated
Oct 25, 2026

Source description

This workflow will replace the background of an image and allow you to alter the colors, flip, flop or morph the background, foreground and output images.

For best results both images should be the same height and width. Or you can set the "Keep proportion" to false on the "Resize Image" node and it will stretch the foreground to fit the background.

This workflow will install the following node packs.

WAS Node Suite

ComfyUI-KJNodes

ComfyUI_essentials

ComfyUI-MingNodes

ComfyUI-Video-Matting

This assumes you already have the Comfyui Manager installed. If not, you will need to install it first before using this workflow.

Download and unzip the workflow to the ComfyUI/user/default/workflows folder.

Open the workflow in Comfy. You will get a message stating the missing nodes. Close the message.

Open the ComfyUI Manager and choose “Install Missing Nodes in Workflow” and install all missing nodes on the list. Restart and refresh.

Restart and refresh the ComfyUI and you’re set.

What you need

Model files
0 GiB

Remaining hardware or download-size estimates are not available yet.

Requirements

Node packs

5

AI-generated commentary

AI-generated explanation based on source and configuration details. Suggestions are clearly labeled.

Purpose

  • Img2img Replace Background uses foreground and background images to replace an image’s background, and lets you alter colors or flip, flop, or morph the background, foreground, and output images.

Inputs and outputs

  • The workflow uses foreground and background images; its output image can also be altered.

Setup

  • If you don’t already have ComfyUI Manager, install it first; unzip the workflow into `ComfyUI/user/default/workflows`.

    Suggestion · not verified

  • Open the workflow, dismiss the missing-nodes message, use ComfyUI Manager’s “Install Missing Nodes in Workflow” option, then restart and refresh ComfyUI.

    Suggestion · not verified

Dependencies

  • It requires ComfyUI-KJNodes, ComfyUI_essentials, ComfyUI-MingNodes, and ComfyUI-Video-Matting.

  • The setup notes also name WAS Node Suite; check whether it appears in ComfyUI Manager’s missing-node list.

    Suggestion · not verified

Configuration

  • For best results, use foreground and background images with the same height and width.

    Suggestion · not verified

  • If their dimensions differ, set “Keep proportion” to false on the “Resize Image” node to stretch the foreground to fit the background.

    Suggestion · not verified

Does this need to be edited?

Sign in to send an edit request.

Sources

1 source
CivitaiPrimary
civitai.com/models/1462970

Verified Jul 19

Source excerpts

1 excerpt

Source context: 497 downloads · Type Workflows · Base model Other