Inpainting
Action ID: inpainting
Description
AI-powered image inpainting that intelligently fills or replaces masked areas in images based on text prompts.
Connection
PixelML Connection
The PixelML connection to call PixelML API.
True
pixelml
Input Parameters
prompt
string
✓
-
Text description of what to generate in the masked area
image_url
string
✓
-
URL of the base image. Supported formats: PNG, JPEG, JPG, WEBP
mask_url
string
✓
-
URL of the mask image defining the area to inpaint. Supported formats: PNG, JPEG, JPG, WEBP
Output Parameters
image
string
URL of the inpainted image with masked area filled
How It Works
This node uses advanced AI diffusion models to intelligently fill or replace masked areas in images. You provide a base image, a mask image that defines which areas to modify, and a text prompt describing what you want to generate. The AI analyzes the surrounding context in the base image and generates new content in the masked area that seamlessly blends with the existing image while following your prompt instructions.
Usage Examples
Example 1: Remove Unwanted Objects
Input:
prompt: "green grass and flowers"
image_url: "https://example.com/park-photo.jpg"
mask_url: "https://example.com/person-mask.png"Output:
image: "https://storage.pixelml.com/inpainted-park.jpg"Example 2: Add New Elements
Input:
prompt: "a red sports car parked in the driveway"
image_url: "https://example.com/house.jpg"
mask_url: "https://example.com/driveway-mask.png"Output:
image: "https://storage.pixelml.com/house-with-car.jpg"Example 3: Change Background Elements
Input:
prompt: "blue sky with white clouds"
image_url: "https://example.com/portrait.jpg"
mask_url: "https://example.com/sky-mask.png"Output:
image: "https://storage.pixelml.com/portrait-new-sky.jpg"Common Use Cases
Object Removal: Remove unwanted objects, people, or blemishes from photos
Background Replacement: Change backgrounds in product photos or portraits
Content Addition: Add new elements like furniture, decorations, or objects to scenes
Image Restoration: Fill in damaged or missing parts of images
Creative Editing: Modify specific areas of images for artistic or design purposes
Product Photography: Enhance product images by changing backgrounds or adding context
Real Estate: Improve property photos by adding or removing elements
Error Handling
Invalid Image Format
Image format is not supported
Ensure images are in PNG, JPEG, JPG, or WEBP format
Mask Mismatch
Mask dimensions don't match image dimensions
Ensure mask image has the same dimensions as the base image
Invalid Mask
Mask image is not properly formatted
Use a binary mask with white areas indicating regions to inpaint
Prompt Too Vague
Prompt doesn't provide enough detail
Provide more specific and descriptive prompts for better results
Image Too Large
Image resolution exceeds maximum limit
Resize images to a smaller resolution before inpainting
Connection Failed
Unable to access PixelML API
Check PixelML connection credentials and API availability
Processing Timeout
Operation took too long to complete
Try with a smaller image or simpler prompt
Notes
Mask Creation: The mask image should have white areas indicating where to inpaint and black areas to preserve. The mask must have the same dimensions as the base image.
Prompt Quality: More detailed and specific prompts generally produce better results. Describe colors, textures, lighting, and style.
Image Resolution: Higher resolution images may take longer to process. Consider using moderate resolutions for faster results.
Context Awareness: The AI considers the surrounding image context when generating inpainted content for natural blending.
Multiple Iterations: You may need to try different prompts or masks to achieve desired results.
Processing Time: Inpainting typically takes 10-30 seconds depending on image size and complexity.
Last updated
Was this helpful?