yiyixuxu commited on
Commit
e253d31
1 Parent(s): eacca6e
Files changed (2) hide show
  1. README.md +105 -1
  2. model_index.json +1 -1
README.md CHANGED
@@ -1,3 +1,107 @@
1
  ---
2
- license: openrail
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ license: mit
3
+ tags:
4
+ - text-to-image
5
+ - text-to-3d
6
+ - shap-e
7
+ - diffusers
8
  ---
9
+
10
+ # Shap-E
11
+
12
+ Shap-E introduces a diffusion process that can generate a 3D image from a text prompt. It was introduced in [Shap-E: Generating Conditional 3D Implicit Functions](https://arxiv.org/abs/2305.02463) by Heewoo Jun and Alex Nichol from OpenAI.
13
+
14
+ Original repository of Shap-E can be found here: https://github.com/openai/shap-e.
15
+
16
+ _The authors of Shap-E didn't author this model card. They provide a separate model card [here](https://github.com/openai/shap-e/blob/main/model-card.md)._
17
+
18
+ ## Introduction
19
+
20
+ The abstract of the Shap-E paper:
21
+
22
+ *We present Shap-E, a conditional generative model for 3D assets. Unlike recent work on 3D generative models which produce a single output representation, Shap-E directly generates the parameters of implicit functions that can be rendered as both textured meshes and neural radiance fields. We train Shap-E in two stages: first, we train an encoder that deterministically maps 3D assets into the parameters of an implicit function; second, we train a conditional diffusion model on outputs of the encoder. When trained on a large dataset of paired 3D and text data, our resulting models are capable of generating complex and diverse 3D assets in a matter of seconds. When compared to Point-E, an explicit generative model over point clouds, Shap-E converges faster and reaches comparable or better sample quality despite modeling a higher-dimensional, multi-representation output space. We release model weights, inference code, and samples at [this https URL](https://github.com/openai/shap-e).*
23
+
24
+ ## Released checkpoints
25
+
26
+ The authors released the following checkpoints:
27
+
28
+ * [openai/shap-e](https://hf.co/openai/shap-e): produces a 3D image from a text input prompt
29
+ * [openai/shap-e-img2img](https://hf.co/openai/shap-e-img2img): samples a 3D image from synthetic 2D image
30
+
31
+ ## Usage examples in 🧨 diffusers
32
+
33
+ First make sure you have installed all the dependencies:
34
+
35
+ ```bash
36
+ pip install transformers accelerate -q
37
+ pip install git+https://github.com/huggingface/diffusers@@shap-ee
38
+ ```
39
+
40
+ Once the dependencies are installed, use the code below:
41
+
42
+ ```python
43
+ import torch
44
+ from diffusers import ShapEPipeline
45
+ from diffusers.utils import export_to_gif
46
+
47
+
48
+ ckpt_id = "openai/shap-e"
49
+ pipe = ShapEPipeline.from_pretrained(repo).to("cuda")
50
+
51
+
52
+ guidance_scale = 15.0
53
+ prompt = "a shark"
54
+ images = pipe(
55
+ prompt,
56
+ guidance_scale=guidance_scale,
57
+ num_inference_steps=64,
58
+ size=256,
59
+ ).images
60
+
61
+ gif_path = export_to_gif(images, "shark_3d.gif")
62
+ ```
63
+
64
+ ## Results
65
+
66
+ <table>
67
+ <tbody>
68
+ <tr>
69
+ <td align="center">
70
+ <img src="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/shap-e/bird_3d.gif" alt="a bird">
71
+ </td>
72
+ <td align="center">
73
+ <img src="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/shap-e/shark_3d.gif" alt="a shark">
74
+ </td align="center">
75
+ <td align="center">
76
+ <img src="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/shap-e/veg_3d.gif" alt="A bowl of vegetables">
77
+ </td>
78
+ </tr>
79
+ <tr>
80
+ <td align="center">A bird</td>
81
+ <td align="center">A shark</td>
82
+ <td align="center">A bowl of vegetables</td>
83
+ </tr>
84
+ </tr>
85
+ </tbody>
86
+ <table>
87
+
88
+ ## Training details
89
+
90
+ Refer to the [original paper](https://arxiv.org/abs/2305.02463).
91
+
92
+ ## Known limitations and potential biases
93
+
94
+ Refer to the [original model card](https://github.com/openai/shap-e/blob/main/model-card.md).
95
+
96
+ ## Citation
97
+
98
+ ```bibtex
99
+ @misc{jun2023shape,
100
+ title={Shap-E: Generating Conditional 3D Implicit Functions},
101
+ author={Heewoo Jun and Alex Nichol},
102
+ year={2023},
103
+ eprint={2305.02463},
104
+ archivePrefix={arXiv},
105
+ primaryClass={cs.CV}
106
+ }
107
+ ```
model_index.json CHANGED
@@ -1,5 +1,5 @@
1
  {
2
- "_class_name": "ShapEPriorPipeline",
3
  "_diffusers_version": "0.17.0.dev0",
4
  "scheduler": [
5
  "diffusers",
 
1
  {
2
+ "_class_name": "ShapEPipeline",
3
  "_diffusers_version": "0.17.0.dev0",
4
  "scheduler": [
5
  "diffusers",