Instructions to use maple-shaft/zero123plus-v1.2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use maple-shaft/zero123plus-v1.2 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("maple-shaft/zero123plus-v1.2", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
Download Dockerfile from maple-shaft/zero123plus-v1.2: direct link, hf CLI and curl.
- Browser
- Download file 1.09 kB
-
https://huggingface.co/maple-shaft/zero123plus-v1.2/resolve/main/Dockerfile
- Command line
-
hf download hf://maple-shaft/zero123plus-v1.2/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/maple-shaft/zero123plus-v1.2/resolve/main/Dockerfile
1.09 kB
| FROM nvidia/cuda:12.1.1-cudnn8-runtime-ubuntu22.04 | |
| ENV DEBIAN_FRONTEND=noninteractive | |
| WORKDIR /opt/app | |
| # System deps | |
| RUN apt-get update && apt-get install -y \ | |
| git \ | |
| python3 \ | |
| python3-pip \ | |
| python3-dev \ | |
| build-essential \ | |
| && rm -rf /var/lib/apt/lists/* | |
| RUN ln -s /usr/bin/python3 /usr/bin/python | |
| # Upgrade pip | |
| RUN pip install --upgrade pip setuptools wheel | |
| # ---- Torch FIRST (critical) ---- | |
| RUN pip install torch torchvision torchaudio \ | |
| --index-url https://download.pytorch.org/whl/cu121 | |
| # ---- Clone pinned Hunyuan3D ---- | |
| ARG HY3D_COMMIT=e2df0625bda7efd5f1daba8f3f2a4cb3d9ac85f8 | |
| RUN git clone https://github.com/tencent/Hunyuan3D-2.git && \ | |
| cd Hunyuan3D-2 && git checkout ${HY3D_COMMIT} | |
| WORKDIR /opt/app/Hunyuan3D-2 | |
| # ---- Install root package ---- | |
| RUN pip install -e . | |
| # ---- Build CUDA extensions ---- | |
| RUN pip install ./hy3dgen/texgen/custom_rasterizer/ops | |
| RUN pip install ./hy3dgen/texgen/differentiable_renderer/ops | |
| # ---- Copy HF handler last (better caching) ---- | |
| WORKDIR /opt/app | |
| COPY handler.py . | |
| ENV PYTHONPATH=/opt/app/Hunyuan3D-2 | |