Image-to-Image
Pruna AI
comfyui
qwen
qwen-image
image-editing
object-removal
inpainting
lora
few-step
Instructions to use PrunaAI/P-Q-Image-2.1-Remove-Object-Comfy with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Pruna AI
How to use PrunaAI/P-Q-Image-2.1-Remove-Object-Comfy with Pruna AI:
from pruna import PrunaModel model = PrunaModel.from_pretrained("PrunaAI/P-Q-Image-2.1-Remove-Object-Comfy") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from PrunaAI/P-Q-Image-2.1-Remove-Object-Comfy: direct link, hf CLI and curl.
- Browser
- Download file 9.61 kB
-
https://huggingface.co/PrunaAI/P-Q-Image-2.1-Remove-Object-Comfy/resolve/main/README.md
- Command line
-
hf download hf://PrunaAI/P-Q-Image-2.1-Remove-Object-Comfy/README.md
-
curl -L -o README.md https://huggingface.co/PrunaAI/P-Q-Image-2.1-Remove-Object-Comfy/resolve/main/README.md
9.61 kB
| license: other | |
| license_name: qwen-research | |
| license_link: https://huggingface.co/Qwen/Qwen-Image-2.1/blob/main/LICENSE | |
| base_model: PrunaAI/P-Q-Image-2.1-Remove-Object | |
| pipeline_tag: image-to-image | |
| tags: | |
| - comfyui | |
| - qwen | |
| - qwen-image | |
| - image-editing | |
| - object-removal | |
| - inpainting | |
| - lora | |
| - few-step | |
| - pruna-ai | |
| <!-- header start --> | |
| <p align="center"> | |
| <img src="assets/P-Q-Image-2.1-Remove-Object.png" width="800"> | |
| </p> | |
| <!-- header end --> | |
| <p align="center"> | |
| <a href="https://github.com/PrunaAI/pruna"> | |
| <img src="https://img.shields.io/badge/GitHub-PrunaAI-9334E9?style=plastic&logo=github&logoColor=white" alt="GitHub"> | |
| </a> | |
| | |
| <a href="https://twitter.com/PrunaAI"> | |
| <img src="https://img.shields.io/badge/Twitter%2FX-@PrunaAI-9334E9?style=plastic&logo=x&logoColor=white" alt="Twitter/X"> | |
| </a> | |
| | |
| <a href="https://www.linkedin.com/company/pruna-ai"> | |
| <img src="https://img.shields.io/badge/LinkedIn-PrunaAI-9334E9?style=plastic&logo=linkedin&logoColor=white" alt="LinkedIn"> | |
| </a> | |
| | |
| <a href="https://discord.com/invite/JFQmtFKCjd"> | |
| <img src="https://img.shields.io/badge/Discord-Join%20us-9334E9?style=plastic&logo=discord&logoColor=white" alt="Discord"> | |
| </a> | |
| </p> | |
| <div align="center"> | |
| <h1 style="color: #9334E9;">β‘ P-Q-Image-2.1-Remove-Object</h1> | |
| <h2>Object removal LoRAs for Qwen-Image-2.1 that leave the rest of the image untouched β ComfyUI</h2> | |
| <h3> | |
| <span style="color: #9334E9;">6 or 8 steps</span> | |
| Β· | |
| <span style="color: #9334E9;">No CFG</span> | |
| Β· | |
| <span style="color: #9334E9;">Mask optional</span> | |
| Β· | |
| Ready-to-use workflows | |
| </h3> | |
| </div> | |
| **Built with Qwen.** | |
| **P-Q-Image-2.1-Remove-Object** is a set of LoRA adapters for | |
| [`Qwen/Qwen-Image-2.1`](https://huggingface.co/Qwen/Qwen-Image-2.1) that **remove the object you point | |
| at, and change nothing else**. Mark the object with a mask (painted in ComfyUI's MaskEditor or loaded | |
| from a file), write what to remove, and the object is replaced by what would be behind it. The rest of | |
| the image stays as it was. | |
| This repository is the ComfyUI export of | |
| [`PrunaAI/P-Q-Image-2.1-Remove-Object`](https://huggingface.co/PrunaAI/P-Q-Image-2.1-Remove-Object), | |
| with ready-to-use workflows, an example and a small custom node. The few-step variants run on top of | |
| PrunaAI's distillation LoRAs from | |
| [`PrunaAI/P-Q-Image-2.1-Comfy`](https://huggingface.co/PrunaAI/P-Q-Image-2.1-Comfy). | |
| <p align="center"> | |
| <img src="examples/p_q_image_2.1_remove_object_example_before_after.jpg" width="800"> | |
| </p> | |
| *"Remove the phone and the raised arm holding it."* The example the workflows open with, 6-step | |
| workflow as shipped. Photo: Aliaksei Antropau, | |
| [Unsplash](https://unsplash.com/photos/person-recording-concert-under-red-lights-n24LASzjRgs). | |
| ## Variants | |
| Pick **6-step** as the default (recommended), or **base** to avoid the few-step model's drift. | |
| | Variant | File | Distillation LoRA (`PrunaAI/P-Q-Image-2.1-Comfy`) | Steps | Strength | Workflow | | |
| |---|---|---|:---:|:---:|---| | |
| | `6-step` | `p_q_image_2.1_remove_object_6_steps_v0.1_comfyui_bf16.safetensors` | `p_q_image_2.1_6_steps_v0.2_comfyui_bf16.safetensors` | 6 | **0.7** | `workflows/p_q_image_2.1_remove_object_v0.1_6step.json` | | |
| | `8-step` | `p_q_image_2.1_remove_object_8_steps_v0.1_comfyui_bf16.safetensors` | `p_q_image_2.1_8_steps_v0.1_comfyui_bf16.safetensors` | 8 | **0.7** | `workflows/p_q_image_2.1_remove_object_v0.1_8step.json` | | |
| | `base` | `p_q_image_2.1_remove_object_base_v0.1_comfyui_bf16.safetensors` | none (base model alone) | 40 | 1.0 | none | | |
| "Strength" is the adapter weight of this LoRA; the distillation LoRA always runs at 1.0. The few-step | |
| variants are made to run on top of the matching distillation LoRA, with its own step count and sigmas, | |
| without CFG: the workflows set all of this. The weights are those of | |
| `PrunaAI/P-Q-Image-2.1-Remove-Object`, converted to ComfyUI's LoRA format (bf16). | |
| ## Quickstart | |
| 1. **Update ComfyUI** to a version with native Qwen-Image-2.1 support. | |
| 2. **Download the models** from [Comfy-Org/Qwen-Image-2.1](https://huggingface.co/Comfy-Org/Qwen-Image-2.1), | |
| [PrunaAI/P-Q-Image-2.1-Comfy](https://huggingface.co/PrunaAI/P-Q-Image-2.1-Comfy) and this repo | |
| (each workflow's *Model links* note has the direct links): | |
| ``` | |
| π ComfyUI/ | |
| βββ π custom_nodes/ | |
| β βββ π precise_removal_outline/ (this repo) | |
| βββ π input/ | |
| β βββ p_q_image_2.1_remove_object_example.png (this repo, examples/) | |
| βββ π models/ | |
| βββ π diffusion_models/ | |
| β βββ qwen_image_2.1_int8_convrot.safetensors | |
| βββ π loras/ | |
| β βββ p_q_image_2.1_6_steps_v0.2_comfyui_bf16.safetensors | |
| β βββ p_q_image_2.1_remove_object_6_steps_v0.1_comfyui_bf16.safetensors (this repo) | |
| βββ π text_encoders/ | |
| β βββ qwen3vl_8b_int8_convrot.safetensors | |
| β βββ qwen3.5_9b_qwen_image_2.1_pe_i2i.int8_convrot.safetensors | |
| βββ π vae/ | |
| βββ qwen_image_2.1_vae_bf16.safetensors | |
| ``` | |
| For the 8-step variant, use the two 8-step LoRAs instead. The prompt-enhancer model | |
| (`qwen3.5_9bβ¦`) is switched off in the workflows, but ComfyUI checks that it is present. | |
| 3. **Install the custom node**: copy `precise_removal_outline/` into `ComfyUI/custom_nodes/`, install its | |
| `requirements.txt` (opencv) into ComfyUI's Python and restart ComfyUI. It adds the *Precise Removal | |
| Outline* node (category Pruna). | |
| 4. **Open a workflow**: drag `workflows/p_q_image_2.1_remove_object_v0.1_6step.json` (or the 8-step one) | |
| onto ComfyUI and press **Run**. It opens on the example above, with the mask already painted. | |
| ## Using the workflow | |
| - **Load Image**: your photo. | |
| - **Mask (optional)**: right-click Load Image, *Open in MaskEditor*, paint over the object, *Save*. Or | |
| load a mask file: select the greyed-out *Load Mask from file* node, press Ctrl+B (Cmd+B on Mac) to | |
| switch it on, and pick the file (white = the object, black = keep, any size). With both, they are | |
| combined. Without a mask, the instruction alone says what to remove. | |
| - **Precise Removal Outline**: the instruction, e.g. *"Remove the man on the left."* With a mask, the | |
| node draws the outline exactly as expected by the model and adds the sentence that goes with it | |
| (*"The area to edit is outlined in red. Remove the red outline as well."*). | |
| - **Run**. Image Compare shows your photo against the result (its slider needs ComfyUI's Nodes 2.0). | |
| The edit box shows only `seed` and `removal_strength`; everything else is fixed inside it (double-click | |
| to see). The result has the photo's exact size: the model generates at the nearest multiples of 32 and | |
| the result is resized back. | |
| ### Recommended settings | |
| - **The mask does not need to be exact.** Rough, generous masks work. Include the object's shadow or | |
| reflection if they should go too, but keep the mask off anything that should stay. | |
| - **Name the object as it appears**, and say which one when there are several similar ones (*"the man | |
| on the right"*). | |
| - **Keep `removal_strength` at 0.7.** Lower strengths reduce texture artifacts, but at 0.5 some removals | |
| fail (the object stays, recolored); much higher, the model also removes neighboring objects. | |
| - **Seed**: fixed. If a removal leaves something behind, try another seed. | |
| ## Limitations | |
| - **It can remove more than the outlined object**, when the mask also covers part of something that | |
| should stay. Keep the mask tight where other things overlap the object. | |
| - **Textures in the filled area can look off**: smoother than their surroundings, or with a faint | |
| regular grid. Photos well under 1 MP also keep less fine texture outside the mask. | |
| - **Only for removing objects.** Other edits are not expected to work better than with the base model. | |
| ## License | |
| P-Q-Image-2.1-Remove-Object is a derivative of Qwen-Image-2.1 and follows the | |
| [Qwen RESEARCH LICENSE AGREEMENT](https://huggingface.co/Qwen/Qwen-Image-2.1/blob/main/LICENSE) (copy in | |
| `LICENSE`, attribution in `NOTICE`). Review its use restrictions before using or redistributing the | |
| adapters. The few-step variants also need PrunaAI's distillation LoRA | |
| ([PrunaAI/P-Q-Image-2.1-Comfy](https://huggingface.co/PrunaAI/P-Q-Image-2.1-Comfy)), whose own terms | |
| apply. | |
| Qwen is licensed under the Qwen RESEARCH LICENSE AGREEMENT, Copyright (c) 2026 Hangzhou Tongyi | |
| Laboratory Technology Co., Ltd. All Rights Reserved. | |
| The example photo is from Unsplash, under the [Unsplash License](https://unsplash.com/license). The | |
| Unsplash License does not cover people in a photo: the person in the example is seen from behind, in | |
| shadow, without a readable face. | |
| ## What's next? | |
| - **Use P-Q-Image-2.1-Remove-Object to remove objects from photos with Qwen-Image-2.1 in a few steps.** | |
| - Compress your own models with [Pruna](https://github.com/PrunaAI/pruna) and give us a βοΈ for more efficiency! | |
| <style> | |
| .model-button { | |
| display: inline-flex; | |
| flex-direction: row; | |
| justify-content: center; | |
| align-items: center; | |
| gap: 8px; | |
| padding: 8px 20px; | |
| border: none; | |
| border-radius: 8px; | |
| background: #9334e9; | |
| color: #ffffff; | |
| font-size: 14px; | |
| font-weight: 400; | |
| line-height: 1; | |
| text-decoration: none; | |
| white-space: nowrap; | |
| cursor: pointer; | |
| box-sizing: border-box; | |
| overflow: visible; | |
| opacity: 1; | |
| } | |
| </style> | |
| <a href="https://dashboard.pruna.ai/login?utm_source=huggingface&utm_medium=model_card&utm_campaign=hf_traffic" class="model-button">Try our models</a> | |