Z-Image Edit Image Editing Workflow: Inpainting/Outpainting/Object Removal Complete Guide

May 13, 2026

Z-Image Edit Image Editing Workflow: Inpainting/Outpainting/Object Removal Complete Guide

Published: 2026-05-13
Author: Z-Image Tech Team
Tags: Z-Image Edit, Inpainting, Outpainting, Object Removal, Image Editing, ComfyUI


Overview

Z-Image Edit is a variant model based on Z-Image Base, specifically fine-tuned for image editing tasks. Unlike general-purpose text-to-image models, Z-Image Edit understands the semantics of editing instructions, enabling precise execution of Inpainting, Outpainting, and Object Removal operations.

This guide comprehensively covers the three core editing modes of Z-Image Edit, helping you build efficient, professional-grade image editing workflows.


Model Selection: Z-Image Edit vs Z-Image Base

Key Differences

Feature Z-Image Base Z-Image Edit
Training Objective Text-to-image generation Image editing instruction following
Inpainting Requires additional training Native support
Outpainting Requires additional training Native support
Object Removal Requires additional training Native support
Edit Instruction Understanding Weak Strong

When to Use Z-Image Edit

  • Making local modifications to existing images
  • Extending image frames (adding background, adjusting composition)
  • Removing unwanted elements
  • Maintaining style consistency with the original image

When to Use Z-Image Base

  • Generating new images from scratch
  • LoRA training (Edit model is not suitable for training)
  • Pure generation scenarios without editing needs

Mode 1: Inpainting (Local Redrawing)

Inpainting allows you to specify a region via a mask and regenerate that area while keeping the masked-out areas unchanged.

Core Workflow

Original Image + Mask → Z-Image Edit → Edited Image

Use Cases

  1. Face Repair: Improve expressions, change clothing, adjust hairstyles
  2. Product Replacement: Change product backgrounds, add/modify product elements
  3. Local Style Transfer: Apply different styles to specific areas
  4. Detail Enhancement: Zoom and regenerate blurry areas

ComfyUI Node Configuration

1. LoadImage — Load original image
2. Mask — Create/load mask area
3. VAEEncodeForInpaint — Encode to inpaint latent
4. CLIPTextEncode — Edit prompt
5. KSampler (Edit Mode) — Execute edit sampling
6. VAEDecode — Decode result
7. SaveImage — Save

Key Parameters

Parameter Recommended Description
Denoise 0.7-0.9 High denoise allows more change
Steps 20-30 Edit model needs more steps
CFG 5.0-7.0 Higher CFG ensures instruction following
Mask Blur 4-8px Soft mask edge transition

Mask Creation Tips

Method 1: Built-in ComfyUI Mask Tools

  • Use DrawMask node for manual drawing
  • Supports rectangle, circle, free brush
  • Adjustable mask feather radius

Method 2: SAM2 Automatic Segmentation

  • Use Segment Anything 2 to auto-detect objects
  • Auto-mask from text descriptions
  • Ideal for precise segmentation of complex shapes

Method 3: External Tools

  • Photoshop/Photopea for mask creation
  • Rembg for auto-background removal
  • Import into ComfyUI for use

Mode 2: Outpainting (Frame Extension)

Outpainting extends the image "outward" from the edges, generating new content beyond the original image boundaries.

Core Workflow

Original Image + Extension Direction → Z-Image Edit → Extended Image

Use Cases

  1. Composition Adjustment: Extend portrait to landscape or vice versa
  2. Background Extension: Add more background space to images
  3. Social Media Adaptation: Extend square images to 16:9 video covers
  4. Creative Extension: Add new elements in specific directions

ComfyUI Node Configuration

1. LoadImage — Load original image
2. ImageScale — Adjust original image position (if centering needed)
3. ImagePadForOutpaint — Fill extension area
4. Mask — Mark extension area (blank area = mask)
5. VAEEncodeForInpaint — Encode
6. CLIPTextEncode — Describe extension content
7. KSampler (Edit Mode) — Execute extension
8. VAEDecode — Decode
9. SaveImage — Save

Key Parameters

Parameter Recommended Description
Extension Width 25%-50% of original width Gradual extension works best
Denoise 0.8-0.9 High denoise allows full creativity
Steps 20-30 Edit model needs more steps
CFG 5.0-7.0 Ensure natural edge transitions

Multi-Step Extension Tips

For large extensions, perform in multiple steps:

Step 1: Extend 25% → Step 2: Extend another 25% → Step 3: Extend another 25%

Advantages:

  • Review results at each step, adjust as needed
  • Avoid quality degradation from single large extension
  • More natural edge transitions

Mode 3: Object Removal

Object removal is essentially a special form of Inpainting — mask the object to remove, then let the model fill the area with surrounding content.

Core Workflow

Original Image + Object Mask → Z-Image Edit (empty prompt or background prompt) → Cleaned Image

Use Cases

  1. Watermark/Logo Removal: Remove copyright marks from images
  2. Clutter Cleanup: Remove power lines, passersby, and distracting elements
  3. Product Retouching: Remove blemishes from product photos
  4. Privacy Protection: Remove sensitive information or faces

Key Techniques

Prompt Strategy:

  • Method 1: Empty prompt — Let the model fill in the background autonomously
  • Method 2: Background description — Describe what the removed area should be
    • Example: Remove power lines → Prompt "clear blue sky, no wires"
    • Example: Remove passerby → Prompt "empty park path, green grass"

Mask Precision:

  • Mask must precisely cover the object to remove
  • Add 2-4px feathering to avoid hard edges
  • For transparent/semi-transparent objects (like wires), make the mask slightly larger

Handling Complex Removals

Scenario: Removing an object that spans a large area (like a person across the frame)

Strategy:

  1. Remove the main subject first
  2. Use lower denoise (0.6-0.7) to maintain background consistency
  3. If results aren't ideal, perform a second refinement round
  4. Use more precise prompts in the second round

Comprehensive Workflow: Mixed Editing

In real scenarios, you often need to combine multiple editing modes. Here's a typical mixed editing workflow:

Case Study: Product Photo Retouching

Step 1: Object Removal
- Remove clutter from the background
- Prompt: clean white background, studio lighting

Step 2: Inpainting
- Fix surface blemishes on the product
- Prompt: pristine condition, clean surface, no scratches

Step 3: Outpainting
- Extend background, add product display space
- Prompt: minimalist studio background, soft lighting

Advanced Techniques

1. Edge Blending Optimization

The boundary between edited areas and the original often shows unnatural transitions. Solutions:

  • Mask Feathering: Set 4-8px feather radius
  • Block Editing: Split large edits into multiple small blocks
  • Iterative Refinement: First pass rough edit + second pass fine tuning

2. Style Consistency

Key to ensuring edited areas match the original style:

  • Reuse Prompts: Include original image style description in edit prompts
  • IP-Adapter Reference: Use original image as IP-Adapter reference input
  • Low Denoise: Use lower denoise (0.5-0.6) to reduce style drift

3. Batch Editing Automation

Use ComfyUI's batch processing capabilities:

FolderInput(original images) → SAM2(auto mask) → KSampler(Edit) → SaveImage

Common Issues and Solutions

Issue 1: Edited Area Doesn't Match Edges

Cause: Insufficient mask feathering or denoise too high.

Solution:

  1. Increase mask feathering to 6-8px
  2. Lower denoise to 0.7
  3. Use second pass with low denoise (0.3) to blend edges

Issue 2: Style Inconsistency After Outpainting

Cause: Model lacks sufficient context to understand original image style.

Solution:

  1. Describe original image style in detail in prompts
  2. Use smaller extension steps (25%)
  3. Consider using IP-Adapter for style preservation

Issue 3: Traces Remain After Object Removal

Cause: Imprecise mask or model can't understand background context.

Solution:

  1. Precisely adjust mask boundaries
  2. Provide clear background description prompts
  3. Remove in stages, handling smaller areas each time

Performance Benchmarks

Edit Type Input Resolution Steps Processing Time (RTX 3090) VRAM
Inpainting 1024×1024 20 ~6s ~6GB
Outpainting (25%) 1024×1280 25 ~8s ~7GB
Object Removal 1024×1024 20 ~6s ~6GB
Mixed Editing (3 steps) 1024→1280 20×3 ~20s ~8GB

Summary

Z-Image Edit is a powerful image editing tool that, compared to general generation models:

  • Native support for Inpainting, Outpainting, and Object Removal
  • Better instruction understanding, reducing trial and error
  • Improved style consistency, edited areas blend naturally with originals
  • Simplified workflow, professional editing without additional training

Master the three core modes of Z-Image Edit and you can effortlessly handle everything from simple touch-ups to professional-grade image retouching.


Z-Image Team

Z-Image Edit Image Editing Workflow: Inpainting/Outpainting/Object Removal Complete Guide | Blog