Instructions to use prithivMLmods/Qwen-Image-2.1-Object-Remover-Bbox-turbo with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use prithivMLmods/Qwen-Image-2.1-Object-Remover-Bbox-turbo with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("Qwen/Qwen-Image-2.1", dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("prithivMLmods/Qwen-Image-2.1-Object-Remover-Bbox-turbo") prompt = "Turn this cat into a dog" input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png") image = pipe(image=input_image, prompt=prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
Qwen-Image-2.1-Object-Remover-Bbox-turbo
Qwen-Image-2.1-Object-Remover-Bbox-turbo is a Turbo-optimized LoRA adapter for Qwen-Image-2.1, designed for object removal using bounding box guidance. The adapter removes unwanted objects from selected regions while attempting to preserve surrounding textures, lighting, shadows, perspective, and overall image consistency. The adapter is optimized for fast Turbo inference and can also be used with standard inference workflows.
This is an experimental model. Results may vary depending on the input image, object, bounding box, and surrounding context.
Model Details
- Base Model: Qwen/Qwen-Image-2.1
- Adapter:
Qwen-Image-2.1-Object-Remover-Bbox-turbo - Model Type: LoRA / Adapter
- Model Status: Experimental
- Inference: Turbo / Standard
- Created by: prithivMLmods
Training Specifications
| Parameter | Configuration |
|---|---|
| Dataset | 80 pairs of high-quality images with bounding box annotations and manually manipulated resultant images |
| Save Precision | BF16 |
| Learning Rate | 1e-4 |
| Optimizer | AdamW |
| Network Dimension (Rank) | 16 |
| Total Steps | 4000 |
| Trigger Prompt | Remove the red highlighted object from the scene |
Download
Download the model files from the Files & versions tab:
Download Qwen-Image-2.1-Object-Remover-Bbox-turbo
Usage
Load the LoRA adapter with Qwen-Image-2.1 and provide an image with the target object indicated by a bounding box.
Use the trigger prompt:
Remove the red highlighted object from the scene
For best results, use a clear bounding box around the object to be removed.
Inference
This adapter is optimized for fast Turbo inference, while remaining compatible with standard inference workflows.
For Turbo inference, follow the recommended inference configuration for Qwen-Image-2.1 and apply the adapter using the appropriate Turbo workflow.
Some Example Comparisons
| Input | - LoRA (Base Model) | + LoRA | Description & Settings |
|---|---|---|---|
|
|
|
Description: Sometimes Base Model without LoRA struggles in retaining shadows after removal (look at the player's head shadow in the no-LoRA edition). Total Steps: 40 |
|
|
|
Description: Base Model without LoRA struggles removing all bounding boxes (one cat remains unremoved). Total Steps: 40 |
|
|
|
Description: Removes unmarked objects and struggles at more than two objects (first silver and last marked black were not removed). Total Steps: 40 |
|
|
|
Description: Base Model without LoRA struggles to remove more than one object bounding box scenario. Total Steps: 40 |
Limitations
This is an experimental release and may produce artifacts or inconsistencies in challenging cases, including:
- Complex backgrounds
- Large or overlapping objects
- Fine structures and textures
- Reflections and transparent objects
- Difficult lighting and perspective conditions
- Ambiguous or poorly positioned bounding boxes
Results can vary depending on the input image, target object, and bounding box placement.
License
Please refer to the license terms of the base model, Qwen-Image-2.1, and ensure compliance with its terms when using or redistributing this adapter.
Acknowledgements
This adapter was created by prithivMLmods and is built for use with Qwen-Image-2.1.
- Downloads last month
- 276
Model tree for prithivMLmods/Qwen-Image-2.1-Object-Remover-Bbox-turbo
Base model
Qwen/Qwen-Image-2.1
