Instructions to use Matteoooo46/ReCoEdit-rewriter with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Matteoooo46/ReCoEdit-rewriter with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("/data/phd/kousiqi/zhitao/models/Qwen3-VL-8B-Instruct") model = PeftModel.from_pretrained(base_model, "Matteoooo46/ReCoEdit-rewriter") - Notebooks
- Google Colab
- Kaggle
| base_model: Qwen/Qwen3-VL-8B-Instruct | |
| library_name: peft | |
| license: apache-2.0 | |
| tags: | |
| - lora | |
| - vision-language | |
| - prompt-rewriting | |
| - image-editing | |
| - ecommerce | |
| # ReCoEdit — Prompt Rewriter LoRA | |
| LoRA adapter for **Qwen3-VL-8B-Instruct**, trained to rewrite raw e-commerce product prompts into structured editing instructions for Qwen-Image-Edit. | |
| - **Base model**: `Qwen/Qwen3-VL-8B-Instruct` | |
| - **Training**: SFT via LLaMA-Factory on paired (product image, raw prompt → structured prompt) data | |
| - **Input**: Product reference image + raw editing prompt (Chinese) | |
| - **Output**: Structured editing prompt optimized for Qwen-Image-Edit (120-150 chars, Chinese) | |
| - **LoRA rank**: 64, trained for 10,000 steps | |
| ## Usage | |
| ```python | |
| from transformers import AutoProcessor | |
| from qwen_vl_utils import process_vision_info | |
| from peft import PeftModel | |
| from transformers import Qwen3VLForConditionalGeneration | |
| from huggingface_hub import snapshot_download | |
| base_model = "Qwen/Qwen3-VL-8B-Instruct" | |
| lora_path = snapshot_download("Matteoooo46/ReCoEdit-rewriter") | |
| model = Qwen3VLForConditionalGeneration.from_pretrained( | |
| base_model, torch_dtype="auto", device_map="auto" | |
| ) | |
| model = PeftModel.from_pretrained(model, lora_path) | |
| processor = AutoProcessor.from_pretrained(base_model, trust_remote_code=True) | |
| ``` | |
| See the [ReCoEdit repository](https://github.com/Matteoooo46/ReCoEdit) for the complete inference pipeline. | |
| ## Citation | |
| ```bibtex | |
| @misc{recoedit2025, | |
| title={ReCoEdit: Rewriter-Guided Consistency Alignment for Product Image Editing}, | |
| author={}, | |
| year={2025}, | |
| howpublished={\url{https://github.com/Matteoooo46/ReCoEdit}}, | |
| } | |
| ``` | |