PartRAG: Retrieval-Augmented Part-Level 3D Generation and Editing
14
stars
9
commits
Python
primary language
Apr 23, 2026
updated
This is the official repository for the paper:
PartRAG: Retrieval-Augmented Part-Level 3D Generation and Editing
Peize Li*, Zeyu Zhang*†, Hao Tang‡
*Equal contribution. †Project lead. ‡Corresponding author.
Paper | Website | Model | HF Paper
@article{li2026partrag,
title={PartRAG: Retrieval-Augmented Part-Level 3D Generation and Editing},
author={Li, Peize and Zhang, Zeyu and Tang, Hao},
journal={arXiv preprint arXiv:2602.17033},
year={2026}
}
This repository is based on PartCrafter and extends it with the PartRAG retrieval and editing pipeline.
Core structure follows the upstream layout:
configs/datasets/scripts/settings/src/PartRAG-specific additions are kept in:
configs/partrag_stage1.yamlconfigs/partrag_stage2.yamlscripts/build_partrag_retrieval_database.pyscripts/edit_partrag.pysrc/retrieval/retrieval_module.pysrc/utils/part_editing.pyStage 1 (RAG + flow matching):
bash scripts/train_partrag.sh \
--config configs/partrag_stage1.yaml \
--use_ema \
--gradient_accumulation_steps 1 \
--output_dir output \
--tag partrag_stage1
Stage 2 (add hierarchical contrastive retrieval losses):
bash scripts/train_partrag.sh \
--config configs/partrag_stage2.yaml \
--use_ema \
--gradient_accumulation_steps 1 \
--output_dir output \
--tag partrag_stage2
PartRAG is designed to fine-tune from upstream open checkpoints.
wgsxm/PartCrafter (base model)wgsxm/PartCrafter-Scene (scene model)/root/autodl-tmp/PartRAG/pretrained_weights/PartRAG)--local_files_only to disable auto-download and require local checkpoints.Build CLIP + DINOv2 retrieval DB with k-means subset selection and FAISS index:
python scripts/build_partrag_retrieval_database.py \
--config configs/partrag_stage1.yaml \
--output_dir retrieval_database_high_quality \
--subset_size 1236 \
--build_faiss
Part-level masked editing (preserves non-target parts and part transforms):
python scripts/edit_partrag.py \
--checkpoint_path <ckpt_dir> \
--input_image <image_path> \
--target_parts 1,3 \
--edit_text "replace legs" \
--retrieval_db <retrieval_db_dir>
settings/setup.sh and settings/requirements.txt.datasets/README.md.PartRAG builds on the open-source implementation of PartCrafter. Upstream-derived components are kept in the same module layout and extended with retrieval and editing-specific logic.
6 commits
3 commits
Python
99.9%
PartRAG: Retrieval-Augmented Part-Level 3D Generation and Editing
14
stars
9
commits
Python
primary language
Apr 23, 2026
updated
This is the official repository for the paper:
PartRAG: Retrieval-Augmented Part-Level 3D Generation and Editing
Peize Li*, Zeyu Zhang*†, Hao Tang‡
*Equal contribution. †Project lead. ‡Corresponding author.
Paper | Website | Model | HF Paper
@article{li2026partrag,
title={PartRAG: Retrieval-Augmented Part-Level 3D Generation and Editing},
author={Li, Peize and Zhang, Zeyu and Tang, Hao},
journal={arXiv preprint arXiv:2602.17033},
year={2026}
}
This repository is based on PartCrafter and extends it with the PartRAG retrieval and editing pipeline.
Core structure follows the upstream layout:
configs/datasets/scripts/settings/src/PartRAG-specific additions are kept in:
configs/partrag_stage1.yamlconfigs/partrag_stage2.yamlscripts/build_partrag_retrieval_database.pyscripts/edit_partrag.pysrc/retrieval/retrieval_module.pysrc/utils/part_editing.pyStage 1 (RAG + flow matching):
bash scripts/train_partrag.sh \
--config configs/partrag_stage1.yaml \
--use_ema \
--gradient_accumulation_steps 1 \
--output_dir output \
--tag partrag_stage1
Stage 2 (add hierarchical contrastive retrieval losses):
bash scripts/train_partrag.sh \
--config configs/partrag_stage2.yaml \
--use_ema \
--gradient_accumulation_steps 1 \
--output_dir output \
--tag partrag_stage2
PartRAG is designed to fine-tune from upstream open checkpoints.
wgsxm/PartCrafter (base model)wgsxm/PartCrafter-Scene (scene model)/root/autodl-tmp/PartRAG/pretrained_weights/PartRAG)--local_files_only to disable auto-download and require local checkpoints.Build CLIP + DINOv2 retrieval DB with k-means subset selection and FAISS index:
python scripts/build_partrag_retrieval_database.py \
--config configs/partrag_stage1.yaml \
--output_dir retrieval_database_high_quality \
--subset_size 1236 \
--build_faiss
Part-level masked editing (preserves non-target parts and part transforms):
python scripts/edit_partrag.py \
--checkpoint_path <ckpt_dir> \
--input_image <image_path> \
--target_parts 1,3 \
--edit_text "replace legs" \
--retrieval_db <retrieval_db_dir>
settings/setup.sh and settings/requirements.txt.datasets/README.md.PartRAG builds on the open-source implementation of PartCrafter. Upstream-derived components are kept in the same module layout and extended with retrieval and editing-specific logic.
6 commits
3 commits
Python
99.9%