Views
No views yet


1git clone <repository-url>
2cd STAR
3conda create -n star python==3.11 -y
4conda activate star1# upgrade pip and setuptools if necessary
2pip install -U pip setuptools
3# install required packages
4pip install -r requirements.txt1STAR/checkpoints/STAR-7B.pt
2STAR/checkpoints/VQ-Model.ptstar/configs/STAR_Qwen2.5-VL-7B.json contains all necessary parameters for model initialization. Make sure to update the paths in the configuration file to match your local setup.python3 gradio_app.py 1python3 inference_understand.py \
2 --image-path "path/to/your/image.jpg" \
3 --question "What is in this image? Describe it in detail." \
4 --max-new-tokens 256 \
5 --model-config "star/configs/STAR_Qwen2.5-VL-7B.json" \
6 --checkpoint "checkpoints/STAR-7B.pt" \
7 --device "cuda:0"--image-path: Path to the input image--question: Question or instruction for the model--max-new-tokens: Maximum number of tokens to generate (default: 256)--model-config: Path to model configuration file--checkpoint: Path to model checkpoint--device: Device to run inference on1python3 inference_generation.py \
2 --prompt "a photo of a cute cat" \
3 --save-path "./outputs/a photo of a cute cat.jpg" \
4 --num-images 1 \
5 --cfg 1.1 \
6 --topk 1000 \
7 --topp 0.8 \
8 --model-config "star/configs/STAR_Qwen2.5-VL-7B.json" \
9 --checkpoint "checkpoints/STAR-7B.pt" \
10 --diffusion-as-decoder \
11 --device "cuda:0"--prompt: Text prompt for image generation--save-path: Path to save the generated image--num-images: Number of images to generate (default: 1)--cfg: Classifier-free guidance scale (default: 1.0)--topk: Top-k sampling parameter (default: 1000)--topp: Top-p sampling parameter (default: 0.8)--diffusion-as-decoder: Use diffusion model as decoder for high-quality generation1python3 inference_edit.py \
2 --image-path "./outputs/a photo of a cute cat.jpg" \
3 --instruction "change the color of cat to blue" \
4 --save-path "./outputs/edited_image.jpg" \
5 --cfg 1.1 \
6 --topk 1000 \
7 --topp 0.8 \
8 --model-config "star/configs/STAR_Qwen2.5-VL-7B.json" \
9 --checkpoint "checkpoints/STAR-7B.pt" \
10 --diffusion-as-decoder \
11 --device "cuda:0"--image-path: Path to the input image to be edited--instruction: Text instruction describing the desired edit--save-path: Path to save the edited image--cfg: Classifier-free guidance scale for editing--topk: Top-k sampling parameter--topp: Top-p sampling parameter--diffusion-as-decoder: Use diffusion model for high-quality image decoding1@article{qin2025star,
2 title={STAR: STacked AutoRegressive Scheme for Unified Multimodal Learning},
3 author={Qin, Jie and Huang, Jiancheng and Qiao, Limeng and Ma, Lin},
4 journal={arXiv preprint arXiv:2512.13752},
5 year={2025}
6}