POST
javascript
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 const axios = require('axios'); const fs = require('fs'); const path = require('path'); async function toB64(imgPath) { const data = fs.readFileSync(path.resolve(imgPath)); return Buffer.from(data).toString('base64'); } const api_key = "YOUR API-KEY"; const url = "https://api.segmind.com/v1/qwen-image-edit-plus-eraser"; const data = { "prompt": "Remove the woman", "image_1": "toB64('https://segmind-resources.s3.amazonaws.com/input/3a92117c-b205-4586-b460-bc4bdbf984c4-output_0.webp')", "image_2": "toB64('')", "image_3": "toB64('')", "lora": "eraser", "aspect_ratio": "match_input_image", "seed": 87568756, "image_format": "webp", "quality": 95, "base64": false }; (async function() { try { const response = await axios.post(url, data, { headers: { 'x-api-key': api_key } }); console.log(response.data); } catch (error) { console.error('Error:', error.response.data); } })();
RESPONSE
image/jpeg
HTTP Response Codes
200 - OKImage Generated
401 - UnauthorizedUser authentication failed
404 - Not FoundThe requested URL does not exist
405 - Method Not AllowedThe requested HTTP method is not allowed
406 - Not AcceptableNot enough credits
500 - Server ErrorServer had some issue with processing

Attributes


promptstr *

Text prompt describing the desired image edit or generation


image_1image ( default: 1 )

Primary input image (URL or base64)


image_2image ( default: 1 )

Secondary input image (URL or base64)


image_3image ( default: 1 )

Tertiary input image (URL or base64)


loraenum:str ( default: eraser )

Pre-configured LoRA model to apply

Allowed values:


lora_2_urlstr ( default: 1 )

Additional LoRA model URL. Public direct url or huggingface url pointing to the lora file


lora_3_urlstr ( default: 1 )

Additional LoRA model URL. Public direct url or huggingface url pointing to the lora file


aspect_ratioenum:str ( default: match_input_image )

Output image aspect ratio

Allowed values:


seedint ( default: 1 )

Random seed for reproducibility. Use -1 for random

min : -1,

max : 2147483647


image_formatenum:str ( default: webp )

Output image format

Allowed values:


qualityint ( default: 95 )

Output image quality (1-100)

min : 1,

max : 100


base64bool ( default: 1 )

Return image as base64 encoded string

To keep track of your credit usage, you can inspect the response headers of each API call. The x-remaining-credits property will indicate the number of remaining credits in your account. Ensure you monitor this value to avoid any disruptions in your API usage.

Qwen-Image-Edit-Remover-General-LoRA: AI Object Removal Model

Edited by Segmind Team on November 25, 2025.


What is Qwen-Image-Edit-Remover-General-LoRA?

Qwen-Image-Edit-Remover-General-LoRA is a model that accurately removes objects from images with a high level of context-awareness for precise results. It is a specialized LoRA adapter developed on the Qwen/Qwen-Image-Edit foundation, making it an advanced AI platform compared to other conventional models. It can effectively erase people from product shots, remove distractions in portraits, and even refine visuals for online stores, all while preserving the scene's natural balance. It works by rebuilding the background (powered by AI), rather than typical clone-stamping, to ensure consistent lighting, shading, and textures. Furthermore, Qwen-Image-Edit-Remover-General-LoRA is designed for seamless integration by working with the Diffusers library and snugly fits into adapted ComfyUI workflows, making it ideal for developers who need high-tech support for their image editing projects.

Key Features of Qwen-Image-Edit-Remover-General-LoRA

  • Intelligent Object Removal: It erases people, animals, and objects without leaving artifacts or visible editing traces.
  • Context-Aware Reconstruction: It automatically fills removed areas with realistic background details that match lighting and perspective.
  • LoRA Architecture: The model's lightweight adapter approach enables fast inference and easy integration with existing Qwen-Image-Edit workflows.
  • Multi-Image Support: It can accept up to three input images for complex composite editing scenarios.
  • Flexible Aspect Ratios: It can support 11 aspect ratio options, including automatic matching to input dimensions.
  • Reproducible Results: The innate seed control ensures consistent outputs across multiple runs.
  • Format Versatility: The model supports export to JPEG, PNG, or WebP with adjustable quality settings (1-100).

Best Use Cases

  • E-commerce and Product Photography: It can seamlessly remove mannequins, background clutter, or unwanted objects from product shots while maintaining professional lighting and shadows.

  • Portrait and Photo Editing: It efficiently cleans up distracting elements from portraits, event photography, or family photos without manual cloning work.

  • Real Estate and Architecture: It can enhance project/ property images by eliminating cars, people, or temporary objects from property photos to showcase clean, uncluttered spaces.

  • Content Creation: It is a perfect model to create images for social media, marketing materials, or graphic design projects by removing unwanted elements.

  • Automated Workflows: It helps in building photo editing pipelines for high-volume image processing, where manual editing isn't scalable and is time-consuming.

Prompt Tips and Output Quality

Effective Prompting for Object Removal:

  • Provide clear prompts to specify what to remove: "Remove the person in the red jacket from the left side."
  • Describe the desired background in detail: "A clean park bench with grass background."
  • For complex scenes, mention the elements that you want to keep: "Keep the trees and buildings intact."

Parameter Optimization:

  • Seed: Use fixed seeds (positive integers) for consistent results during testing; use -1 for creative variations.
  • Aspect Ratio: Set aspect ratio to "match_input_image" to preserve original dimensions, or specify custom ratios for resizing.
  • Image Quality: Use 90-100 for final outputs; lower values (70-85) work for previews.
  • Image Format: Choose PNG for lossless quality and transparency support; WebP for optimal compression.

Best Practices:

  • Provide high-resolution input images to remove objects with precision and clarity.
  • For multi-object removal, process one object at a time with chained requests.
  • Test different seed values to achieve a perfect outcome, especially if initial results show artifacts.
  • The model works best when the objects that have to be erased have clear boundaries.

FAQs

Is Qwen-Image-Edit-Remover-General-LoRA open-source?
Yes, Qwen-Image-Edit-Remover-General-LoRA is based on Qwen's open-source Image-Edit foundation with the LoRA adapter available for integration.

How is it different from Photoshop's content-aware fill?
This model uses AI diffusion techniques to understand the scene's context to deliver a photorealistic outcome, making it superior to traditional algorithm-based tools, especially for object removal with images that have complex backgrounds.

What parameters should I tweak for the best results?
To achieve perfect results, start with default settings, then adjust the seed for variation control and quality settings (90+) for production use. Furthermore, for specific aspect ratios, override "match_input_image" as needed.

Can I use custom LoRA models with this?
Yes, through the advanced lora_2_url and lora_3_url parameters, you can load additional LoRA adapters for extended capabilities or style control.

Does it work with transparent backgrounds?
The model is primarily designed to handle opaque images. But you can also use the PNG format to preserve existing transparency layers in your workflow.

How do I ensure reproducible edits across batches?
To achieve reproducible edits across batches, set a fixed seed value (any positive integer) instead of the default random seed (-1). This ensures identical outputs for the same input image and prompt combination.