Hash3D: Training-free Acceleration for 3D Generation
Python
178
46 commits
updated Oct 28, 2024
This repository contains the official implementation for our paper
Hash3D: Training-free Acceleration for 3D Generation
🥯[Project Page] 📝[Paper] </>[code]
Xingyi Yang, Xinchao Wang
National University of Singapore

We present Hash3D, a universal solution to acclerate score distillation samplin (SDS) based 3D generation. By effectively hashing and reusing these feature maps across neighboring timesteps and camera angles, Hash3D substantially prevents redundant calculations, thus accelerating the diffusion model's inference in 3D generation tasks.
What we offer:
| Prompt | Gaussian-Dreamer | Hash3D + Gaussian-Dreamer $${\color{red}\text{(Speed X1.5)}}$$ |
|---|---|---|
| A bear dressed as a lumberjack |
https://github.com/Adamdad/hash3D/assets/26020510/80a4658f-7233-49aa-a357-ff296396185b |
https://github.com/Adamdad/hash3D/assets/26020510/3882341f-c5f1-4f4f-8f24-d1c080ecdb2f |
| A train engine made out of clay |
https://github.com/Adamdad/hash3D/assets/26020510/1111d8ba-aae5-4117-9340-5d950702e49b |
https://github.com/Adamdad/hash3D/assets/26020510/06b7bbf3-0edb-4d2f-a2f2-c11bab5c7b64 |
The repository is organized into three main directories, each catering to a different repo that Hash3D can be applied on:
threesdtudio-hash3d: Contains the implementation of Hash3D tailored for use with the threestudio.dreamgaussian-hash3d: Focuses on integrating Hash3D with the DreamGaussian for image-to-3D generation.gaussian-dreamer-hash3d: Dedicated to applying Hash3D to GaussianDreamer for faster text-to-3D tasks.The core implementation is in the guidance_loss for each SDS loss computation. We
See hash3D/threestudio-hash3d/threestudio/models/guidance/zero123_unified_guidance_cache.py for example. The code for the hash table implementation is in hash3D/threestudio-hash3d/threestudio/utils/hash_table.py.
Navigate to each of the specific directories for environment-specific installation instructions.
Refer to the README within each directory for detailed usage instructions tailored to each environment.
For example, to run Zero123+SDS with hash3D
cd threestudio-hash3d
python launch.py --config configs/stable-zero123_hash3d.yaml --train --gpu 0 data.image_path=https://adamdad.github.io/hash3D/load/images/dog1_rgba.png
pred_dir and the gt rendering at gt_dir, runpython eval_nvs.py --gt $gt_dir --pr $pred_dir
assets/prompt.txt. And compute the CLIP score between text and rendered image aspython eval_clip_sim.py "$gt_prompt" $pred_dir --mode text
We borrow part of the code from DeepCache for feature extraction from diffusion models. We also thanks the implementation from threestudio, DreamGaussian, Gaussian-Dreamer, and the valuable disscussion with @FlorinShum and @Horseee.
@misc{yang2024hash3d,
title={Hash3D: Training-free Acceleration for 3D Generation},
author={Xingyi Yang and Xinchao Wang},
year={2024},
eprint={2404.06091},
archivePrefix={arXiv},
primaryClass={cs.CV}
}
Python
97.5%
Cuda
1.4%
Hash3D: Training-free Acceleration for 3D Generation
Python
178
46 commits
updated Oct 28, 2024
This repository contains the official implementation for our paper
Hash3D: Training-free Acceleration for 3D Generation
🥯[Project Page] 📝[Paper] </>[code]
Xingyi Yang, Xinchao Wang
National University of Singapore

We present Hash3D, a universal solution to acclerate score distillation samplin (SDS) based 3D generation. By effectively hashing and reusing these feature maps across neighboring timesteps and camera angles, Hash3D substantially prevents redundant calculations, thus accelerating the diffusion model's inference in 3D generation tasks.
What we offer:
| Prompt | Gaussian-Dreamer | Hash3D + Gaussian-Dreamer $${\color{red}\text{(Speed X1.5)}}$$ |
|---|---|---|
| A bear dressed as a lumberjack |
https://github.com/Adamdad/hash3D/assets/26020510/80a4658f-7233-49aa-a357-ff296396185b |
https://github.com/Adamdad/hash3D/assets/26020510/3882341f-c5f1-4f4f-8f24-d1c080ecdb2f |
| A train engine made out of clay |
https://github.com/Adamdad/hash3D/assets/26020510/1111d8ba-aae5-4117-9340-5d950702e49b |
https://github.com/Adamdad/hash3D/assets/26020510/06b7bbf3-0edb-4d2f-a2f2-c11bab5c7b64 |
The repository is organized into three main directories, each catering to a different repo that Hash3D can be applied on:
threesdtudio-hash3d: Contains the implementation of Hash3D tailored for use with the threestudio.dreamgaussian-hash3d: Focuses on integrating Hash3D with the DreamGaussian for image-to-3D generation.gaussian-dreamer-hash3d: Dedicated to applying Hash3D to GaussianDreamer for faster text-to-3D tasks.The core implementation is in the guidance_loss for each SDS loss computation. We
See hash3D/threestudio-hash3d/threestudio/models/guidance/zero123_unified_guidance_cache.py for example. The code for the hash table implementation is in hash3D/threestudio-hash3d/threestudio/utils/hash_table.py.
Navigate to each of the specific directories for environment-specific installation instructions.
Refer to the README within each directory for detailed usage instructions tailored to each environment.
For example, to run Zero123+SDS with hash3D
cd threestudio-hash3d
python launch.py --config configs/stable-zero123_hash3d.yaml --train --gpu 0 data.image_path=https://adamdad.github.io/hash3D/load/images/dog1_rgba.png
pred_dir and the gt rendering at gt_dir, runpython eval_nvs.py --gt $gt_dir --pr $pred_dir
assets/prompt.txt. And compute the CLIP score between text and rendered image aspython eval_clip_sim.py "$gt_prompt" $pred_dir --mode text
We borrow part of the code from DeepCache for feature extraction from diffusion models. We also thanks the implementation from threestudio, DreamGaussian, Gaussian-Dreamer, and the valuable disscussion with @FlorinShum and @Horseee.
@misc{yang2024hash3d,
title={Hash3D: Training-free Acceleration for 3D Generation},
author={Xingyi Yang and Xinchao Wang},
year={2024},
eprint={2404.06091},
archivePrefix={arXiv},
primaryClass={cs.CV}
}
Python
97.5%
Cuda
1.4%