{"id":20599643,"url":"https://github.com/adamdad/hash3d","last_synced_at":"2025-07-28T21:08:59.933Z","repository":{"id":232506420,"uuid":"772027223","full_name":"Adamdad/hash3D","owner":"Adamdad","description":"Hash3D: Training-free Acceleration for 3D Generation","archived":false,"fork":false,"pushed_at":"2024-10-28T10:01:43.000Z","size":75027,"stargazers_count":168,"open_issues_count":2,"forks_count":8,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-05-17T21:03:58.066Z","etag":null,"topics":["3d","diffusion-models","efficiency","image-to-3d","text-to-3d"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Adamdad.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-14T11:55:32.000Z","updated_at":"2025-05-17T16:36:07.000Z","dependencies_parsed_at":"2024-11-16T08:34:27.476Z","dependency_job_id":"e44270fb-84cb-44de-bd6d-ed51401ec028","html_url":"https://github.com/Adamdad/hash3D","commit_stats":null,"previous_names":["adamdad/hash3d"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Adamdad/hash3D","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adamdad%2Fhash3D","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adamdad%2Fhash3D/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adamdad%2Fhash3D/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adamdad%2Fhash3D/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Adamdad","download_url":"https://codeload.github.com/Adamdad/hash3D/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adamdad%2Fhash3D/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267585825,"owners_count":24111577,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3d","diffusion-models","efficiency","image-to-3d","text-to-3d"],"created_at":"2024-11-16T08:33:39.137Z","updated_at":"2025-07-28T21:08:59.898Z","avatar_url":"https://github.com/Adamdad.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cbr\u003e\n\u003cdiv align=\"center\"\u003e\n\u003cimg src=\"assets/logo.jpg\" width=\"400px\"\u003e\u003c/img\u003e\n\u003ch2\u003eTraining-free Acceleration \u003cbr\u003e for 3D Generation 🏎️💨\u003ch2\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://opensource.org/licenses/MIT\"\u003e\u003cimg src=\"https://img.shields.io/badge/License-MIT-4caf50.svg\" alt=\"License\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://arxiv.org/abs/2404.06091\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/badge/arXiv-2404.06091-b31b1b.svg\" alt=\"arXiv\"\u003e  \u003ca href=\"https://adamdad.github.io/hash3D/\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/badge/Project-Website-orange\" alt=\"arXiv\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003c/div\u003e\n\n\n\n## Introduction\nThis repository contains the official implementation for our paper\n\n**Hash3D: Training-free Acceleration for 3D Generation**\n\n🥯[[Project Page](https://adamdad.github.io/hash3D/)] 📝[[Paper](https://arxiv.org/abs/2404.06091)] \u003c/\u003e[[code](https://github.com/Adamdad/hash3D)]\n\nXingyi Yang, Xinchao Wang\n\nNational University of Singapore\n\n\n\n![pipeline](assets/pipeline.jpg)\n\n\n\u003e 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.\n\n**What we offer**: \n- ⭐ Compatiable to Any 3D generation method using SDS.\n- ⭐ Inplace Accerlation for 1.3X - 4X. \n- ⭐ Training-Free.\n\n## Results Visualizations\n\n\n\u003csection class=\"section\"\u003e\n  \u003cdiv class=\"container is-max-desktop\"\u003e\n    \u003cdiv class=\"columns is-centered\"\u003e\n      \u003cdiv class=\"column is-full-width\"\u003e\n        \u003ch3 class=\"title is-3\"\u003eImage-to-3D Results\u003c/h3\u003e\n        \u003cdiv class=\"content has-text-justified\"\u003e\n          \u003ctable\u003e\n            \u003ctr\u003e\n              \u003cth\u003eInput Image\u003c/th\u003e\n              \u003cth\u003eZero-1-to-3\u003c/th\u003e\n              \u003cth\u003eHash3D + Zero-1-to-3 $${\\color{red} \\text{(Speed X4.0)}}$$ \u003c/th\u003e\n            \u003c/tr\u003e\n            \u003ctr\u003e\n              \u003ctd\u003e\n              \n  ![baby_phoenix_on_ice (1)](https://github.com/Adamdad/hash3D/assets/26020510/0148a4c7-bd07-4121-898b-c444829bc5ef) \n              \n  \u003c/td\u003e\n              \u003ctd\u003e\n\nhttps://github.com/Adamdad/hash3D/assets/26020510/797d78f0-d2d7-43a3-94af-bf57c9c5ef70\n\n\u003c/td\u003e\n              \u003ctd\u003e\n\nhttps://github.com/Adamdad/hash3D/assets/26020510/c02701f1-fd92-4601-8569-18c7c17cde97\n\n\u003c/td\u003e\n            \u003c/tr\u003e\n            \u003ctr\u003e\n              \u003ctd\u003e\n\n  ![grootplant_rgba (1)](https://github.com/Adamdad/hash3D/assets/26020510/93ee8db8-0d49-4324-9fb3-c5941579da84)\n\n\n  \u003c/td\u003e\n              \u003ctd\u003e\n\nhttps://github.com/Adamdad/hash3D/assets/26020510/a41ba688-40bf-4d95-95de-37b669a90887\n\n\u003c/td\u003e\n              \u003ctd\u003e\n\nhttps://github.com/Adamdad/hash3D/assets/26020510/86d9e46d-0554-4a87-9960-ce3a9f83bdd7\n\n\u003c/td\u003e\n            \u003c/tr\u003e\n          \u003c/table\u003e\n        \u003c/div\u003e\n      \u003c/div\u003e\n    \u003c/div\u003e\n  \u003c/div\u003e\n\n\u003csection class=\"section\"\u003e\n  \u003cdiv class=\"container is-max-desktop\"\u003e\n    \u003cdiv class=\"columns is-centered\"\u003e\n      \u003cdiv class=\"column is-full-width\"\u003e\n        \u003ch3 class=\"title is-3\"\u003eText-to-3D Results\u003c/h3\u003e\n        \u003cdiv class=\"content has-text-justified\"\u003e\n          \u003ctable\u003e\n            \u003ctr\u003e\n              \u003cth\u003ePrompt\u003c/th\u003e\n              \u003cth\u003eGaussian-Dreamer\u003c/th\u003e\n              \u003cth\u003eHash3D + Gaussian-Dreamer $${\\color{red}\\text{(Speed X1.5)}}$$ \u003c/th\u003e\n            \u003c/tr\u003e\n            \u003ctr\u003e\n              \u003ctd style=\"text-align: center; vertical-align: middle; font-size:18px; font-family:Comic sans MS\"\u003eA bear dressed as a lumberjack\u003c/td\u003e\n              \u003ctd\u003e\n\nhttps://github.com/Adamdad/hash3D/assets/26020510/80a4658f-7233-49aa-a357-ff296396185b\n\n\u003c/td\u003e\n              \u003ctd\u003e\n\nhttps://github.com/Adamdad/hash3D/assets/26020510/3882341f-c5f1-4f4f-8f24-d1c080ecdb2f\n\n\u003c/td\u003e\n            \u003c/tr\u003e\n            \u003ctr\u003e\n              \u003ctd style=\"text-align: center; vertical-align: middle; font-size:18px; font-family:Comic sans MS\"\u003eA train engine made out of clay\u003c/td\u003e\n              \u003ctd\u003e\n\nhttps://github.com/Adamdad/hash3D/assets/26020510/1111d8ba-aae5-4117-9340-5d950702e49b\n\n\u003c/td\u003e\n              \u003ctd\u003e\n\nhttps://github.com/Adamdad/hash3D/assets/26020510/06b7bbf3-0edb-4d2f-a2f2-c11bab5c7b64\n\n\u003c/td\u003e\n            \u003c/tr\u003e\n          \u003c/table\u003e\n        \u003c/div\u003e\n      \u003c/div\u003e\n    \u003c/div\u003e\n  \u003c/div\u003e\n\n## Project Structure\nThe repository is organized into three main directories, each catering to a different repo that Hash3D can be applied on:\n\n1. `threesdtudio-hash3d`: Contains the implementation of Hash3D tailored for use with the [`threestudio`](https://github.com/threestudio-project/threestudio).\n2. `dreamgaussian-hash3d`: Focuses on integrating Hash3D with the DreamGaussian for image-to-3D generation.\n3. `gaussian-dreamer-hash3d`: Dedicated to applying Hash3D to GaussianDreamer for faster text-to-3D tasks.\n\n### What we add?\nThe core implementation is in the `guidance_loss` for each SDS loss computation. We \n\nSee `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`.\n\n## Getting Started\n\n### Installation\nNavigate to each of the specific directories for environment-specific installation instructions.\n\n### Usage\nRefer to the `README` within each directory for detailed usage instructions tailored to each environment.\n\nFor example, to run Zero123+SDS with hash3D\n```shell\ncd threestudio-hash3d\npython launch.py --config configs/stable-zero123_hash3d.yaml --train --gpu 0 data.image_path=https://adamdad.github.io/hash3D/load/images/dog1_rgba.png\n```\n\n### Evaliation\n1. **Image-to-3D**: GSO dataset GT meshes and renderings can be found online. With the rendering of the reconstructed 3D objects at `pred_dir` and the gt rendering at `gt_dir`, run\n\n```shell\npython eval_nvs.py --gt $gt_dir --pr $pred_dir \n```\n2. **Text-to-3D**: Run all the prompts in `assets/prompt.txt`. And compute the CLIP score between text and rendered image as\n```shell\npython eval_clip_sim.py \"$gt_prompt\" $pred_dir --mode text\n```\n\n## Acknowledgement\n\nWe borrow part of the code from [DeepCache](https://github.com/horseee/DeepCache) for feature extraction from diffusion models. \nWe also thanks the implementation from [threestudio](https://github.com/threestudio-project/threestudio), [DreamGaussian](https://github.com/dreamgaussian/dreamgaussian), [Gaussian-Dreamer](https://github.com/hustvl/GaussianDreamer), and the valuable disscussion with [@FlorinShum](https://github.com/FlorinShum) and [@Horseee](https://github.com/horseee).\n\n## Citation\n\n```bibtex\n@misc{yang2024hash3d,\n      title={Hash3D: Training-free Acceleration for 3D Generation}, \n      author={Xingyi Yang and Xinchao Wang},\n      year={2024},\n      eprint={2404.06091},\n      archivePrefix={arXiv},\n      primaryClass={cs.CV}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadamdad%2Fhash3d","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadamdad%2Fhash3d","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadamdad%2Fhash3d/lists"}