Reworked the workflow completely and switched to SD 1.5 with IC Light for totally different approach than before. Also changed the background removal tool for an even better mask. Please let me know about any issues...
Runtime profile
Source description
Version 3.0
Reworked the workflow completely and switched to SD 1.5 with IC Light for totally different approach than before. Also changed the background removal tool for an even better mask. Please let me know about any issues you run into.
Version 2.0
Reworked a lot of stuff and the workflow looks a little more complex now, but the output quality improved drastically. I hope you like it and I am looking forward to your feedback and thoughts!
How does this work? It takes your input image and generates a background with your input image with CosXL. But CosXL changes the input image, therefore its not as good. I am bypassing this by removing the generated subject from the generated image and editing the input image back on top with some slight adjustments.
AI-generated commentary
AI-generated explanation based on source and configuration details. Suggestions are clearly labeled.
Boto's Background Swapper is a ComfyUI workflow for editing backgrounds in existing product photos. It takes a product photo and text prompt, detects the subject, creates a background, applies basic color adjustments, and outputs an image with the subject over the new background.
It generates a background from the input image, removes the generated subject, and places the input subject back with slight adjustments before compositing and color matching.
The 26-node layout includes image loading, prompt encoding, masking, sampling, compositing, previewing, and saving.
Input: an existing product photo and a text prompt. The workflow detects the subject and edits it into the prompt.
Output: an image with the input subject, a generated background, slight subject adjustments, and basic color adjustments.
Use ComfyUI Manager to find the custom nodes, and read each node's description if you run into issues.
Suggestion
Required model files are epicphotogasm_ultimateFidelity.safetensors and iclight_sd15_fc.safetensors.
It requires comfyui-easy-use at 1.2.7, comfyui-ic-light at 1.0.3, comfyui-ic-light-native at 1.0.1, and comfyui-jdcn at 1.0.2.
Additional node packs are comfyui-kjnodes at 1.0.5, comfyui-rmbg at 1.8.0, and rgthree-comfy at 32142fe476878a354dda6e2d4b5ea98960de3ced.
Version 3.0 uses SD 1.5 with IC Light and a changed background-removal tool.
Grouped nodes reduce visual clutter and keep the workflow simple.
For manual finishing, edit the image output in Photoshop or similar software before compositing and color matching.
Suggestion
Before setup, verify that epicphotogasm_ultimateFidelity.safetensors and iclight_sd15_fc.safetensors are available; no download URLs are listed for these files.
Suggestion · not verified
The mask may be imperfect, and prompts can sometimes produce outputs that resemble the input.
Does this need to be edited?
Sign in to send an edit request.
Sources
1 sourceSource excerpts
1 excerptSource context: 574 downloads · Type Workflows · Base model SD 1.5
Known issue in this version is that the mask is not perfect all the time, not sure how to improve that bit at the moment unfortunately.
Version 1.0
The first release of my ComfyUI workflow for editing the background of existing product photos. Custom nodes can be found with ComfyUI Manager. Read the description of each node on how to use it if you run into issues! CosXL_edit Model is a must, others won't work!
This Workflow will detect the subject and edit it into your prompt. It will also do basic color adjustments and is made of group nodes to reduce the spaghetti and keep it simple. This does not give you perfect results. Editing the final image output (before the compositing and color matching in ComfyUI happens) in Photoshop or similar software will give way better results. I just wanted to make this ComfyUI only.
Prompting can be a little weird sometimes and you might get outputs that look like your inputs. Play around a little and I am sure it will work out some way or another!
Estimated VRAM requirement
Estimate unavailable
Model file sizes are not complete enough to calculate this requirement yet.
Requirements
9 requirementsepicphotogasm_ultimateFidelity.safetensors
Not resolvedCheckpoint · Unknown
iclight_sd15_fc.safetensors
Not resolvedCheckpoint · Unknown
Node pack · Registry
Node pack · Registry
Node pack · Registry
Node pack · Registry
Node pack · Registry
Node pack · Registry
Node pack · Registry