
Stable Diffusion Inpainting
Stable Diffusion Inpainting is a model that can be used to generate and modify images based on text prompts.
Avg Run Time: 1.000s
Model Slug: stable-diffusion-inpainting
Category: Image to Image
Input
Enter an URL or choose a file from your computer.
Click to upload or drag and drop
image/jpeg, image/png, image/jpg, image/webp (Max 50MB)
Enter an URL or choose a file from your computer.
Click to upload or drag and drop
image/jpeg, image/png, image/jpg, image/webp (Max 50MB)
Output
Example Result
Preview and download your result.

Create a Prediction
Send a POST request to create a new prediction. This will return a prediction ID that you'll use to check the result. The request should include your model inputs and API key.
Get Prediction Result
Poll the prediction endpoint with the prediction ID until the result is ready. The API uses long-polling, so you'll need to repeatedly check until you receive a success status.
Overview
Stable Diffusion Inpainting is designed for inpainting tasks, enabling users to seamlessly restore or modify images by filling in missing or altered parts. Leveraging textual descriptions and visual cues, the model produces outputs that integrate naturally with the existing image. It is ideal for tasks like restoration, creative editing, and customized visual projects, offering numerous parameters for precise control.
Technical Specifications
Inpainting Capability: The model specializes in filling masked areas of an image with content that aligns with the provided prompt while maintaining consistency with the surrounding context.
High-Quality Output: Generates detailed and coherent images with realistic textures, lighting, and blending.
Versatile Modifications: Supports a wide range of image edits, including object addition, background changes, and defect correction.
Prompt-Driven Generation: Relies on descriptive text prompts to guide the inpainting process, allowing for creative and specific outputs.
Consistent Reproducibility: Allows for deterministic results through seed-based random number generation.
Content Safety Features: Includes an optional safety checker to ensure outputs adhere to appropriate content guidelines.
Key Considerations
- Image Quality: Use high-resolution base images for optimal results.
- Mask Precision: Ensure the mask accurately defines the area to modify.
- Prompt-Output Alignment: Avoid overly complex or conflicting prompts that may confuse the model.
- Inference Steps: Balance between time and detail; excessive steps may not always yield noticeable improvements.
Tips & Tricks
- Refining Prompts: Start with a general description and gradually add details for better control.
- Negative Prompting: Use the negative_prompt parameter to exclude unwanted elements effectively.
- Custom Resolutions: Match aspect_ratio to the dimensions of your input image for consistency.
Capabilities
- Realistic Inpainting: Seamlessly integrates new elements into existing images.
- Customizable Outputs: Adjust parameters to meet specific project needs.
What Can I Use It For?
- Image Restoration: Repair damaged or incomplete photos and artwork.
- Creative Edits: Add, modify, or remove elements for artistic purposes.
- Design Enhancements: Tailor visuals for presentations, media, or marketing.
- Prototype Visualization: Generate concept visuals quickly for brainstorming.
Things to Be Aware Of
- Restoration Projects: Repair old or damaged images by filling in missing parts.
- Creative Variations: Explore different prompts with the same base image to generate unique outputs.
- Custom Masking: Define intricate areas to edit for precise results.
- Size Testing: Compare results at different sizes to determine the best settings for your use case.
SCHEDULER
- DDIM:
- Use for faster results with smooth transitions.
- Works well with fewer inference steps.
- K_EULER:
- Ideal for sharp and detailed outputs.
- Pair with medium to high guidance scale values for clarity.
- DPMSolverMultistep:
- Best for balancing speed and quality.
- Delivers excellent results with fewer steps.
- K_EULER_ANCESTRAL:
- Great for creative and artistic outputs.
- Experiment with lower guidance scales for diverse results.
- PNDM:
- Ensures high accuracy and consistency.
- Use more steps for highly detailed outputs.
- KLMS:
- Perfect for high-resolution, realistic images.
- Higher guidance scales enhance detailed scenes like landscapes.
Limitations
- Output Consistency: Complex prompts or conflicting inputs may lead to unpredictable results.
- Resolution Constraints: Extremely high resolutions may increase processing time significantly.
- Mask Limitations: Poorly defined masks can lead to unintended modifications.
- Safety Checker: Disabling it may result in outputs that do not meet content guidelines.
Output Format: PNG
Pricing Detail
This model runs at a cost of $0.001540 per second.
The average execution time is 1 seconds, but this may vary depending on your input data.
The average cost per run is $0.001540
Pricing Type: Execution Time
Cost Per Second means the total cost is calculated based on how long the model runs. Instead of paying a fixed fee per run, you are charged for every second the model is actively processing. This pricing method provides flexibility, especially for models with variable execution times, because you only pay for the actual time used.
Related AI Models
You can seamlessly integrate advanced AI capabilities into your applications without the hassle of managing complex infrastructure.