Add model card for TV-Edit
#1
by nielsr HF Staff - opened
README.md
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
pipeline_tag: image-to-image
|
| 4 |
+
tags:
|
| 5 |
+
- image-editing
|
| 6 |
+
- multi-modal
|
| 7 |
+
---
|
| 8 |
+
|
| 9 |
+
# Text-Vision Co-Instructed Image Editing (TV-Edit)
|
| 10 |
+
|
| 11 |
+
This repository contains the weights for **TV-Edit**, a Textual-Visual instruction unified Editing framework. TV-Edit jointly models textual instructions as semantic intent and sparse visual instructions (such as points or drags) as spatial guidance to achieve precise and intent-faithful image manipulation.
|
| 12 |
+
|
| 13 |
+
[**Project Page**](https://xiechenxi99.github.io/TVEdit/) | [**Paper**](https://huggingface.co/papers/2606.16767) | [**GitHub**](https://github.com/PolyU-VCLab/TVEdit)
|
| 14 |
+
|
| 15 |
+
## Introduction
|
| 16 |
+
TV-Edit is designed to unify the strengths of textual instructions and visual prompts. By integrating semantic intent and spatial constraints, TV-Edit leads to more precise spatial control, less instruction ambiguity, and stronger structural consistency than text-only or drag-based alternatives.
|
| 17 |
+
|
| 18 |
+
## Installation
|
| 19 |
+
|
| 20 |
+
To set up the environment, run the following commands:
|
| 21 |
+
|
| 22 |
+
```shell
|
| 23 |
+
## git clone the repository
|
| 24 |
+
git clone https://github.com/PolyU-VCLab/TVEdit.git
|
| 25 |
+
cd TVEdit
|
| 26 |
+
|
| 27 |
+
# create an environment
|
| 28 |
+
conda create -n TVEdit python=3.10
|
| 29 |
+
conda activate TVEdit
|
| 30 |
+
|
| 31 |
+
pip install --upgrade pip
|
| 32 |
+
pip install torch==2.5.0+cu121 torchvision==0.20.0+cu121 --index-url https://download.pytorch.org/whl/cu121
|
| 33 |
+
pip install transformers==4.52.4 pytorch-lightning==2.4.0 diffusers==0.35.1
|
| 34 |
+
```
|
| 35 |
+
|
| 36 |
+
## Usage
|
| 37 |
+
|
| 38 |
+
You can run the interactive Gradio demo to test the model:
|
| 39 |
+
|
| 40 |
+
1. Download the base model checkpoint: [Qwen-Image-Edit](https://huggingface.co/Qwen/Qwen-Image-Edit).
|
| 41 |
+
2. Download the trained TV-Edit weights from this repository.
|
| 42 |
+
3. [Optional] TV-Edit supports existing trained acceleration LoRA for 4-step editing: [Qwen-Image-Edit-4step](https://huggingface.co/lightx2v/Qwen-Image-Lightning/blob/main/Qwen-Image-Edit-Lightning-4steps-V1.0-bf16.safetensors).
|
| 43 |
+
4. Launch the Gradio demo:
|
| 44 |
+
|
| 45 |
+
```shell
|
| 46 |
+
python gradio_demo.py
|
| 47 |
+
```
|
| 48 |
+
|
| 49 |
+
After launching the demo, you can upload an image, draw point trajectories for spatial control, and enter textual instructions for semantic changes.
|
| 50 |
+
|
| 51 |
+
## Citation
|
| 52 |
+
|
| 53 |
+
If you find this work helpful, please cite:
|
| 54 |
+
|
| 55 |
+
```bibtex
|
| 56 |
+
@article{xie2026text-vision,
|
| 57 |
+
title={Text-Vision Co-Instructed Image Editing},
|
| 58 |
+
author={Xie, Chenxi and Wu, Yuhui and Yi, Qiaosi and Zhang, Lei},
|
| 59 |
+
journal={arXiv preprint arXiv:2606.16767},
|
| 60 |
+
year={2026},
|
| 61 |
+
}
|
| 62 |
+
```
|