This repo provides the official implementation of AnchorFlow, a training-free framework for 3D shape editing. The method performs editing directly in the 3D latent space by aligning source and target flow trajectories with latent anchors, enabling semantic-consistent, identity-preserving, and mask-free 3D editing across both rigid and non-rigid scenarios.

AnchorFlow builds upon Hunyuan3D 2.1, which serves as the base flow model. We recommend using CUDA 12.4 (as suggested in the official Hunyuan3D instructions) or CUDA 12.1.
# Create a conda environment
conda create -n anchorflow python=3.10
# Install PyTorch
pip install torch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1 \
--index-url https://download.pytorch.org/whl/cu124
# Install dependencies
pip install -r requirements_cuda124.txt
pip install torch-cluster -f https://data.pyg.org/whl/torch-2.5.1+cu124.html
# Install PyTorch
pip install torch==2.4.0 torchvision==0.19.0 torchaudio==2.4.0 \
--index-url https://download.pytorch.org/whl/cu121
pip install -r requirements_cuda121.txt
pip install torch-cluster -f https://data.pyg.org/whl/torch-2.4.0+cu121.html
Run AnchorFlow with default settings. More examples can be found in ./examples.
python3 src/anchorflow.py
Given a source shape and editing prompt, we first construct the editing conditions, including the source image and target image. Then, we organize the inputs and perform 3D editing.
source image from the source shape.
Use the Render Multiview Images script in TRELLIS. Then select one suitable rendering as the source image.target image using a 2D editing model: Apply a 2D editing model (e.g., Nano Banana) to edit the source image according to the given editing prompt, producing the target image.src.glb: the source shapesrc.png: the source imageedited.png: the target imageYou can find example setups in ./examples.
The Eval3DEdit benchmark is available on Hugging Face.
hf download chengzgui/Eval3DEdit \
--repo-type dataset \
--local-dir Eval3DEdit
We provide the Uni3D/CLIP evaluation script under eval/.
To run the evaluator, prepare Uni3D separately and point the script to it:
git clone https://github.com/baaivision/Uni3D.git
pip install open_clip_torch trimesh pyrender Pillow numpy
Download the Uni3D checkpoint and EVA02 CLIP weights following the Uni3D instructions, then run:
CUDA_VISIBLE_DEVICES=0 python eval/uni3d_eval.py Eval3DEdit \
--pred_root outputs/anchorflow \
--pred_mesh_relpath edited.glb \
--metadata_csv Eval3DEdit/metadata.csv \
--uni3d_repo /path/to/Uni3D \
--ckpt_path /path/to/uni3d/model.pt \
--clip_weights_path /path/to/eva02_e_14_plus_laion2b_s9b_b144k.pt \
--output_csv results/anchorflow_uni3d.csv
EGL: cannot open shared object file: No such file or directory error during rendering mesh, try to install following packages: sudo apt-get install libegl1-mesa libgl1-mesa-glx.Our repo is built on top of several several awesome projects and works, including FlowEdit, Hunyuan3D 2.1 and EditP23.
If you find AnchorFlow useful for your research and applications, please cite us using this BibTex:
@article{zhou2025anchorflow,
title={AnchorFlow: Training-Free 3D Editing via Latent Anchor-Aligned Flows},
author={Zhou, Zhenglin and Ma, Fan and Gui, Chengzhuo and Xia, Xiaobo and Fan, Hehe and Yang, Yi and Chua, Tat-Seng},
journal={arXiv preprint arXiv:2511.22357},
year={2025},
}
11 commits
2 commits
Python
99.4%
This repo provides the official implementation of AnchorFlow, a training-free framework for 3D shape editing. The method performs editing directly in the 3D latent space by aligning source and target flow trajectories with latent anchors, enabling semantic-consistent, identity-preserving, and mask-free 3D editing across both rigid and non-rigid scenarios.

AnchorFlow builds upon Hunyuan3D 2.1, which serves as the base flow model. We recommend using CUDA 12.4 (as suggested in the official Hunyuan3D instructions) or CUDA 12.1.
# Create a conda environment
conda create -n anchorflow python=3.10
# Install PyTorch
pip install torch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1 \
--index-url https://download.pytorch.org/whl/cu124
# Install dependencies
pip install -r requirements_cuda124.txt
pip install torch-cluster -f https://data.pyg.org/whl/torch-2.5.1+cu124.html
# Install PyTorch
pip install torch==2.4.0 torchvision==0.19.0 torchaudio==2.4.0 \
--index-url https://download.pytorch.org/whl/cu121
pip install -r requirements_cuda121.txt
pip install torch-cluster -f https://data.pyg.org/whl/torch-2.4.0+cu121.html
Run AnchorFlow with default settings. More examples can be found in ./examples.
python3 src/anchorflow.py
Given a source shape and editing prompt, we first construct the editing conditions, including the source image and target image. Then, we organize the inputs and perform 3D editing.
source image from the source shape.
Use the Render Multiview Images script in TRELLIS. Then select one suitable rendering as the source image.target image using a 2D editing model: Apply a 2D editing model (e.g., Nano Banana) to edit the source image according to the given editing prompt, producing the target image.src.glb: the source shapesrc.png: the source imageedited.png: the target imageYou can find example setups in ./examples.
The Eval3DEdit benchmark is available on Hugging Face.
hf download chengzgui/Eval3DEdit \
--repo-type dataset \
--local-dir Eval3DEdit
We provide the Uni3D/CLIP evaluation script under eval/.
To run the evaluator, prepare Uni3D separately and point the script to it:
git clone https://github.com/baaivision/Uni3D.git
pip install open_clip_torch trimesh pyrender Pillow numpy
Download the Uni3D checkpoint and EVA02 CLIP weights following the Uni3D instructions, then run:
CUDA_VISIBLE_DEVICES=0 python eval/uni3d_eval.py Eval3DEdit \
--pred_root outputs/anchorflow \
--pred_mesh_relpath edited.glb \
--metadata_csv Eval3DEdit/metadata.csv \
--uni3d_repo /path/to/Uni3D \
--ckpt_path /path/to/uni3d/model.pt \
--clip_weights_path /path/to/eva02_e_14_plus_laion2b_s9b_b144k.pt \
--output_csv results/anchorflow_uni3d.csv
EGL: cannot open shared object file: No such file or directory error during rendering mesh, try to install following packages: sudo apt-get install libegl1-mesa libgl1-mesa-glx.Our repo is built on top of several several awesome projects and works, including FlowEdit, Hunyuan3D 2.1 and EditP23.
If you find AnchorFlow useful for your research and applications, please cite us using this BibTex:
@article{zhou2025anchorflow,
title={AnchorFlow: Training-Free 3D Editing via Latent Anchor-Aligned Flows},
author={Zhou, Zhenglin and Ma, Fan and Gui, Chengzhuo and Xia, Xiaobo and Fan, Hehe and Yang, Yi and Chua, Tat-Seng},
journal={arXiv preprint arXiv:2511.22357},
year={2025},
}
11 commits
2 commits
Python
99.4%