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
File size: 1,636 Bytes
95761bd daf34c0 95761bd daf34c0 95761bd daf34c0 | 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 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | ---
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}},
}
```
|