Skip to main content

3D generative model

Shap-E local deployment: 315M parameters, 1.33GB of fp16 weights, one 24GB card for the full text-to-3D pipeline

OpenAI's Shap-E does not emit point clouds or voxels. It diffuses the parameters of an implicit function directly, so a single latent renders as a NeRF or marching-cubes out as a vertex-coloured mesh. The weights are tiny. All the memory pressure sits in the render step.

Shap-E is a two-stage system. Stage one is the transmitter: a PointCloudPerceiverChannelsEncoder (12 layers, width 1024, fed point clouds plus multi-view point clouds) that deterministically maps a 3D asset into implicit-function parameters. Stage two is a conditional diffusion model trained over that 1,048,576-dimensional latent space — the latent is shaped 1024x1024 and the prior is a 24-layer, 16-head, width-1024 transformer that works out to exactly 315M parameters, which is why OpenAI calls it text300M. Sampling uses HeunDiscreteScheduler with 1024 training timesteps, an exp beta schedule, a prediction target of x_start rather than the usual epsilon, and Karras sigmas (sigma_min=1e-3, sigma_max=160). A 64-step Shap-E sample means something completely different from a 64-step Stable Diffusion sample, so do not carry over your scheduler intuitions.

The resource picture is counterintuitive: the weights are not the constraint. The openai/shap-e repo on Hugging Face is 4.9GB, but that is fp32 and fp16 copies sitting side by side. What you actually load in half precision is prior 631.4MB, renderer 452.6MB and the CLIP ViT-L/14 text tower 247.3MB — about 1.33GB total. The image-conditioned repo, openai/shap-e-img2img, swaps the text tower for a 606.4MB CLIP vision tower, roughly 1.69GB in fp16. The original .pt checkpoints are small too: transmitter.pt 1.78GB, text_cond.pt 1.26GB, image_cond.pt 1.26GB, vector_decoder.pt 905MB. The VRAM goes to rendering. create_pan_cameras spins a 20-frame orbit by default, and the NeRSTF renderer takes 64 coarse plus 128 fine samples per ray, so memory scales as frame_size squared times 20 frames times 192 samples times batch_size. The official notebook defaults to batch_size=4, and issue #42 in the repo is an RTX 2060 Super 8GB dying at exactly that step.

One more piece of reality. The openai/shap-e repository has 14 commits total and the last one landed in November 2023 (a normalize_scene bug fix), so upstream is effectively frozen. The quality ceiling is written into the config as well: the transmitter's renderer block sets grid_size: 128, meaning STF mesh extraction is permanently 128-cubed marching cubes, and CLIP's 77-token prompt limit caps how much description you can push in. You will not prompt your way to Hunyuan3D-2.1 (a 3.0B shape DiT plus a 1.3B texture model) or TRELLIS detail. But Shap-E remains the fastest, cheapest, most legible implicit-3D baseline there is: MIT licensed, 1.33GB of weights, latents in seconds, and ShapEPipeline still maintained on the diffusers main branch. On NexGPU an RTX 3090 24GB is $0.193/GPU-hour, metered per second and stopped when you stop the instance — far cheaper than fighting your local CUDA install.

01 —

Four checkpoints and two pipelines

Real on-disk sizes for the official .pt files and the diffusers pipelines, verified byte for byte

VersionParametersVRAMContextNotes
text300M (text_cond.pt)315Mfp32 checkpoint 1.26GB / fp16 ~631MB77-token prompt (CLIP ViT-L/14)The text-conditioned diffusion prior: 24 layers, 16 heads, width 1024, emitting a 1024x1024 latent.
image300M (image_cond.pt)316Mfp32 checkpoint 1.26GB, plus a 606MB fp16 CLIP vision towerOne reference image, background removal recommendedThe image-to-3D variant; conditioning moves from text to CLIP image embeddings and the official guidance_scale is 3.0, not 15.0.
transmitter (transmitter.pt)444Mfp32 checkpoint 1.78GB1,048,576-dim latent (1024x1024)Encoder and decoder fused; you only need it to encode your own 3D assets into the latent space, and that path additionally requires Blender 3.3.1+ with BLENDER_PATH set.
vector_decoder (decoder.pt)226Mfp32 checkpoint 905MB / fp16 452.6MBgrid_size 128, 64 coarse + 128 fine samplesInference-only needs just this: latent to NeRSTF implicit field, then NeRF render or STF mesh extraction.
diffusers openai/shap-e315M prior + 124M CLIP text tower~1.33GB across three fp16 files (4.9GB whole repo)frame_size 64-256, 20-frame orbitThe best-maintained path: three lines of ShapEPipeline, and output_type="mesh" gets you geometry directly.
diffusers openai/shap-e-img2img316M prior + 303M CLIP vision tower~1.69GB in fp16 (6.0GB whole repo)Reference image resized to 256x256ShapEImg2ImgPipeline; the common community pattern is generating the image with Kandinsky or SDXL first, then lifting it to 3D.

02 —

Which GPU to rent for Shap-E

With 1.33GB of weights, the real sizing question is render throughput and batch size

  • Cheapest way to run text-to-3D end to end: fp16, batch 1, frame_size 64 then 256

    RTX 3090 24GB$0.193/GPU-hour

    Ampere gives you bf16, and 24GB comfortably absorbs the default batch_size=4 orbit render at frame_size 256, at the lowest rate on the fleet.

  • Interactive prompt iteration with repeated 20-frame 256px orbits and STF mesh exports

    RTX 4090 24GB$0.540/GPU-hour

    The bottleneck is per-sample MLP evaluation inside NeRSTF, and the 4090's compute density shortens every iteration of the tuning loop.

  • Batch-generating hundreds of prompts into an asset library with batch_size 8-16

    A100 PCIE 80GB$0.824/GPU-hour

    Render memory scales linearly with batch_size, so 80GB lets you render a whole sweep in parallel and export once instead of reloading weights repeatedly.

  • Using Shap-E as a baseline while benchmarking Hunyuan3D-2.1 on the same box (6GB for shape, 16GB for shape plus texture)

    RTX 5090 32GB$0.723/GPU-hour

    32GB holds Shap-E's 1.33GB alongside Hunyuan3D's full shape-and-texture stack, so the comparison never needs a second instance.

03 —

Four steps to a running Shap-E

From a NexGPU PyTorch image to a glb you can drop into Blender

  1. 01

    Start the instance and install dependencies

    Pick an RTX 3090 24GB and a PyTorch prebuilt image in the NexGPU console, then connect over SSH or Jupyter. Shap-E's dependency footprint is unusually light — nothing here compiles a CUDA extension.

    pip install diffusers transformers accelerate trimesh
  2. 02

    Pull fp16 weights and run your first prompt

    Pass variant="fp16" so you fetch only the half-precision shards instead of dragging down the full 4.9GB repo. The official guidance_scale is 15.0, use 64 inference steps, and start at frame_size 64 to confirm the pipeline works before going to 256.

    python -c "import torch; from diffusers import ShapEPipeline; from diffusers.utils import export_to_gif; p=ShapEPipeline.from_pretrained('openai/shap-e', torch_dtype=torch.float16, variant='fp16').to('cuda'); export_to_gif(p('a shark', guidance_scale=15.0, num_inference_steps=64, frame_size=256).images[0], 'shark.gif')"
  3. 03

    Extract the mesh and fix its orientation

    Setting output_type to "mesh" takes the STF branch and gives you a 128-cubed marching-cubes surface, which export_to_ply writes out. Shap-E meshes are posed from a bottom viewpoint by default, so rotate -90 degrees about X before importing into Blender or Unreal or your model will be lying on its side.

    python -c "import trimesh, numpy as np; m=trimesh.load('3d_cake.ply'); m.apply_transform(trimesh.transformations.rotation_matrix(-np.pi/2,[1,0,0])); m.export('3d_cake.glb', file_type='glb')"
  4. 04

    Install the original repo only if you need it

    You only need the upstream clone for native image300M sampling or for encode_model.ipynb, which encodes your own assets into the latent space. Note that setup.py carries a git dependency on OpenAI's CLIP, and the encode path additionally requires Blender 3.3.1+ with BLENDER_PATH exported.

    git clone https://github.com/openai/shap-e && cd shap-e && pip install -e . && pip install git+https://github.com/openai/CLIP.git

What one asset-generation run actually costs

Price it on an RTX 3090 24GB at $0.193/GPU-hour. Boot, install diffusers, pull the fp16 shards of openai/shap-e (about 1.33GB) — ten minutes, so 0.167h x $0.193 = $0.03. Then sweep 200 prompts, each at batch_size=4 with frame_size=64 for candidates and a frame_size=256 re-render for the keepers, plus ply and obj export: call it 3 hours of GPU, 3 x $0.193 = $0.58. Weights plus eight hundred-odd mesh files occupy 30GB; destroy the instance the same day and storage at $0.414/GB-month prorates to 30 x $0.414 / 30 = $0.41 for that day. Pulling roughly 4GB of glb files back down costs 4 x $0.0081 = $0.03. Total: a shade over $1.05. Want the 20-frame 256px renders to finish noticeably faster? The same 3 hours on an RTX 4090 24GB is 3 x $0.540 = $1.62. As for the H100 SXM 80GB at $3.582/GPU-hour — a 315M-parameter prior cannot come close to saturating it; save that budget for Hunyuan3D or for training. NexGPU meters per second and prices per hour, with no minimum, no setup fee and no quota request, and compute billing stops the moment the instance stops.

04 —

FAQ

How much VRAM does Shap-E actually need? Is an 8GB card enough?

The weights are trivial: in fp16 the prior is 631.4MB, the renderer 452.6MB and the CLIP text tower 247.3MB, about 1.33GB total. But VRAM is not set by the weights. NeRSTF takes 64 coarse plus 128 fine samples per ray, create_pan_cameras fires a 20-frame orbit, and memory grows as frame_size squared times 20 times 192 times batch_size. The official notebook defaults to batch_size=4, and repo issue #42 is exactly an RTX 2060 Super 8GB blowing up at that step. Drop to batch_size=1 and frame_size=64 and 8GB will hold; run the defaults comfortably and you want 24GB. NexGPU's RTX 3090 24GB is $0.193/GPU-hour, which beats buying a card for this.

Is Shap-E obsolete? Is it still worth deploying?

Upstream is frozen: openai/shap-e has 14 commits total and the last was the November 2023 normalize_scene fix. The quality ceiling is baked into the config too — the transmitter's renderer block sets grid_size to 128, so STF meshes are always 128-cubed marching cubes and the rounded, blobby silhouettes are structural, not a prompting failure. For higher detail you should be looking at Hunyuan3D-2.1 (Hunyuan3D-DiT-v2-1, a 3.0B shape model, plus Hunyuan3D-Paint-v2-1 at 1.3B for texture; the project states 6GB VRAM for shape and 16GB for shape plus texture) or a structured-latent approach like TRELLIS. Shap-E is still the cheapest baseline going: MIT licensed, 1.33GB of weights, latents in seconds, ShapEPipeline still live on diffusers main. Rent an RTX 5090 32GB on NexGPU at $0.723/GPU-hour and you can benchmark Shap-E and Hunyuan3D side by side on one machine without moving data.

Can Shap-E output go straight into Blender or Unreal?

Yes, with two catches. Orientation: meshes from decode_latent_mesh and from export_to_ply are posed from a bottom viewpoint, so you must rotate -pi/2 about X before import — the diffusers docs hand you the exact trimesh transform. Materials: the STF branch produces per-vertex RGB, not a UV unwrap with a texture map, and 128-cubed vertex density is your colour resolution. Real PBR textures mean retopologising and baking yourself, or moving to a pipeline with a dedicated paint model. The upstream repo writes ply and obj (obj output arrived via community PR #20) and trimesh converts to glb. None of that post-processing touches the GPU, so do it on the same NexGPU instance and skip a round of data transfer.

Why do my results look so much worse than the demos?

Usually three things. Prompts: text conditioning runs through the CLIP ViT-L/14 text tower with max_position_embeddings of 77, so long sentences are hard-truncated — Shap-E wants short, concrete, common object nouns. Guidance: the diffusers signature defaults guidance_scale to 4.0, but the official notebook and docs both use 15.0, and leaving it at the default gives you mush. Sample count: the official notebook's batch_size=4 exists so you can pick one of four; Shap-E's variance is genuinely high and a single sample is a coin flip. Also raise num_inference_steps to 64 as the examples do, rather than the signature default of 25. All of this is trial and error, which is exactly what per-second billing is for — NexGPU's RTX 4090 24GB is $0.540/GPU-hour and compute billing stops when you stop the instance.

Can I run Shap-E on cheap cards like T4, V100 or P40?

First separate fp16 from bf16. The Hugging Face model card mentions bfloat16, but bf16 needs Ampere or newer — neither the Tesla T4 (Turing) nor the Tesla V100 (Volta) supports it, so use torch.float16 with variant="fp16" and both run fine. T4 16GB is $0.298/GPU-hour and V100 32GB is $0.188/GPU-hour, and the V100's 32GB actually gives you more batch headroom than a 3090. The Tesla P40 is a different story: the GP102 die runs FP16 at one sixty-fourth of FP32 throughput, and no amount of 24GB VRAM rescues that — $0.214/GPU-hour looks cheap and is effectively the most expensive option here. If you want cheap, NexGPU's RTX 3090 24GB at $0.193/GPU-hour has both bf16 and 24GB and settles the argument.

How much do I have to download, and what are the known install gotchas?

The diffusers route is clean: pip install diffusers, transformers, accelerate and trimesh, and pull weights with variant="fp16" to fetch only the half-precision shards (about 1.33GB). Omit that argument and you drag down all 4.9GB of fp32 plus fp16. The upstream repo has more sharp edges: setup.py pins clip @ git+https://github.com/openai/CLIP.git so the install needs GitHub access; Python 3.8 and below hit an AttrDict TypeError (fixed by PR #75); and encode_model.ipynb requires Blender 3.3.1 or newer with BLENDER_PATH set. NexGPU ships 2,000+ prebuilt images including PyTorch, vLLM and ComfyUI, so CUDA is configured before you log in, and support is bilingual over Telegram with no ticket queue. The console is at console.nexgpu.net.

Start building on NexGPU

Enterprise R&D team or solo developer — either way, your first job can be running in minutes.

Sign up to browse live network pricing. No payment method required.