ComfyUI Insert Anything brings ByteDance's powerful Insert Anything technology to the ComfyUI environment. Built on the Diffusion Transformer (DiT) architecture, this Insert Anything tool enables you to seamlessly transfer elements from reference images to target scenes while maintaining visual harmony and preserving fine details.
The Insert Anything workflow stands out from traditional image editing tools by allowing natural integration of objects, people, garments, and faces between different images with remarkable identity preservation that makes Insert Anything a versatile solution.
Step-by-Step Insert Anything Process:
Source section: Upload the target image you want Insert Anything to modify (e.g., a racetrack scene)Reference section: Upload an image containing the element you want Insert Anything to insert (e.g., a race car)CR Prompt Text node for Insert Anything:
Src_mask_option and Ref_mask_option if neededRun button to process your images with Insert Anything
Core Insert Anything Components:
Insert Anything Preprocessing:
source_image: Your target image requiring Insert Anything modificationref_image: Your reference image with the element for Insert Anything to insertsource_mask/ref_mask: Auto-generated or user-provided masks for Insert Anythingiterations: Controls Insert Anything mask expansion for better coverage (default: 2)Insert Anything Inference:
seed: Allows reproducible Insert Anything results or variations by changing this valueSegmentation Tools for Insert Anything:
SAM Integration with Insert Anything:
LayerMask: Load SegmentAnything Models: Initializes the object detection system for Insert AnythingLayerMask: SegmentAnythingUltra V3: Controls the Insert Anything masking process
threshold: Adjusts mask detection sensitivity for Insert Anything (default: 0.30)detail_erode/detail_dilate: Fine-tunes mask boundaries in Insert Anythingprocess_detail: Toggles enhanced processing for complex edges in Insert Anythingmax_megapixels: Manages memory usage for large Insert Anything imagesInsert Anything Mask Controls:
Src_mask_option/Ref_mask_option: Select between automatic (sketch) or manual (upload) masking for Insert AnythingInsert Anything Masking Refinement:
iterations parameter when you need Insert Anything to expand mask coverageInsert Anything Workflow Optimization:
seed values to get variations from Insert AnythingEffective Insert Anything Prompting:
This workflow implements Insert Anything, originally developed by ByteDance as described in their research paper "Insert Anything: Image Insertion via In-Context Editing in DiT". The ComfyUI Insert Anything integration provides a user-friendly interface for this technology. Full credit goes to the original authors for their innovative Insert Anything work.
RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Playground, enabling artists to harness the latest AI tools to create incredible art.