Instructions to use xiaoyu1104/InstanceControl_depth with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use xiaoyu1104/InstanceControl_depth with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("xiaoyu1104/InstanceControl_depth", dtype="auto") - Notebooks
- Google Colab
- Kaggle
Create model card and add metadata
#1
by nielsr HF Staff - opened
README.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: transformers
|
| 3 |
+
pipeline_tag: text-to-image
|
| 4 |
+
license: other
|
| 5 |
+
---
|
| 6 |
+
|
| 7 |
+
# InstanceControl: Sa2va-Instance-4B (Stage 1)
|
| 8 |
+
|
| 9 |
+
This repository contains the `Sa2va-Instance-4B` checkpoint, which serves as **Stage 1** (Instance Parsing Model) for **InstanceControl**, presented in the paper [InstanceControl: Controllable Complex Image Generation without Instance Labeling](https://huggingface.co/papers/2606.31924).
|
| 10 |
+
|
| 11 |
+
* **Project Page:** [InstanceControl Homepage](https://instancecontrol.github.io/InstanceControl/)
|
| 12 |
+
* **GitHub Repository:** [InstanceControl GitHub](https://github.com/liuxiaoyu1104/InstanceControl)
|
| 13 |
+
* **Paper:** [arXiv:2606.31924](https://huggingface.co/papers/2606.31924)
|
| 14 |
+
|
| 15 |
+
## Model Description
|
| 16 |
+
|
| 17 |
+
InstanceControl is a multi-instance controllable generation method that eliminates the need for manual instance labeling. It uses a Vision-Language Model (VLM)—specifically this `Sa2va-Instance-4B` model—to automatically parse instance descriptions from text prompts and predict instance masks based on visual conditions (such as Canny edges, depth, or HED).
|
| 18 |
+
|
| 19 |
+
## Usage
|
| 20 |
+
|
| 21 |
+
For detailed instructions on setup, environment installation, and running the inference pipeline, please refer to the [official GitHub repository](https://github.com/liuxiaoyu1104/InstanceControl).
|
| 22 |
+
|
| 23 |
+
### Predict Instance Masks (Stage 1)
|
| 24 |
+
|
| 25 |
+
You can run the model to predict instance masks using the following command:
|
| 26 |
+
|
| 27 |
+
```bash
|
| 28 |
+
python stage1_Sa2VA/projects/llava_sam2/evaluation/gcg_eval_our_folders.py \
|
| 29 |
+
--model_path /path/to/Sa2va-Instance-4B \
|
| 30 |
+
--image_dir ./example/canny \
|
| 31 |
+
--json_dir ./example/json \
|
| 32 |
+
--save_dir ./results/json_pred_canny
|
| 33 |
+
```
|
| 34 |
+
|
| 35 |
+
## Citation
|
| 36 |
+
|
| 37 |
+
If you find this project useful, please cite the authors' work:
|
| 38 |
+
|
| 39 |
+
```bibtex
|
| 40 |
+
@article{liu2026instancecontrol,
|
| 41 |
+
title={InstanceControl: Controllable Complex Image Generation without Instance Labeling},
|
| 42 |
+
author={Xiaoyu Liu and Huan Wang and Fan Li and Zhixin Wang and Jiaqi Xu and Ming Liu and Wangmeng Zuo},
|
| 43 |
+
journal={arXiv preprint arXiv:2606.31924},
|
| 44 |
+
year={2026}
|
| 45 |
+
}
|
| 46 |
+
```
|