Instructions to use bennyguo/zero123-diffusers with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use bennyguo/zero123-diffusers with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("bennyguo/zero123-diffusers", 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
bennyguo commited on
Commit ·
4645652
1
Parent(s): 6a94d42
upload zero123 diffusers weights
Browse filesFiles changed (16)
- README.md+69
- clip_camera_projection/config.jsonAdded+6
- clip_camera_projection/diffusion_pytorch_model.fp16.safetensorsAdded+3
- clip_camera_projection/diffusion_pytorch_model.safetensorsAdded+3
- feature_extractor/preprocessor_config.jsonAdded+28
- image_encoder/config.jsonAdded+23
- image_encoder/model.fp16.safetensorsAdded+3
- image_encoder/model.safetensorsAdded+3
- model_index.jsonAdded+33
- scheduler/scheduler_config.jsonAdded+19
- unet/config.jsonAdded+64
- unet/diffusion_pytorch_model.fp16.safetensorsAdded+3
- unet/diffusion_pytorch_model.safetensorsAdded+3
- vae/config.jsonAdded+30
- vae/diffusion_pytorch_model.fp16.safetensorsAdded+3
- vae/diffusion_pytorch_model.safetensorsAdded+3
123---license: mit---123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172---license: mit---# Uses_Note: This section is originally taken from the [Stable Diffusion v2 model card](https://huggingface.co/stabilityai/stable-diffusion-2), but applies in the same way to Zero-1-to-3._## Direct UseThe model is intended for research purposes only. Possible research areas and tasks include:- Safe deployment of large-scale models.- Probing and understanding the limitations and biases of generative models.- Generation of artworks and use in design and other artistic processes.- Applications in educational or creative tools.- Research on generative models.Excluded uses are described below.### Misuse, Malicious Use, and Out-of-Scope UseThe model should not be used to intentionally create or disseminate images that create hostile or alienating environments for people. This includes generating images that people would foreseeably find disturbing, distressing, or offensive; or content that propagates historical or current stereotypes.#### Out-of-Scope UseThe model was not trained to be factual or true representations of people or events, and therefore using the model to generate such content is out-of-scope for the abilities of this model.#### Misuse and Malicious UseUsing the model to generate content that is cruel to individuals is a misuse of this model. This includes, but is not limited to:- Generating demeaning, dehumanizing, or otherwise harmful representations of people or their environments, cultures, religions, etc.- Intentionally promoting or propagating discriminatory content or harmful stereotypes.- Impersonating individuals without their consent.- Sexual content without consent of the people who might see it.- Mis- and disinformation- Representations of egregious violence and gore- Sharing of copyrighted or licensed material in violation of its terms of use.- Sharing content that is an alteration of copyrighted or licensed material in violation of its terms of use.## Limitations and Bias### Limitations- The model does not achieve perfect photorealism.- The model cannot render legible text.- Faces and people in general may not be parsed or generated properly.- The autoencoding part of the model is lossy.- Stable Diffusion was trained on a subset of the large-scale dataset [LAION-5B](https://laion.ai/blog/laion-5b/), which contains adult, violent and sexual content. To partially mitigate this, Stability AI has filtered the dataset using LAION's NSFW detector.- Zero-1-to-3 was subsequently finetuned on a subset of the large-scale dataset [Objaverse](https://objaverse.allenai.org/), which might also potentially contain inappropriate content. To partially mitigate this, our demo applies a safety check to every uploaded image.### BiasWhile the capabilities of image generation models are impressive, they can also reinforce or exacerbate social biases.Stable Diffusion was primarily trained on subsets of [LAION-2B(en)](https://laion.ai/blog/laion-5b/), which consists of images that are limited to English descriptions.Images and concepts from communities and cultures that use other languages are likely to be insufficiently accounted for.This affects the overall output of the model, as Western cultures are often overrepresented.Stable Diffusion mirrors and exacerbates biases to such a degree that viewer discretion must be advised irrespective of the input or its intent.### Safety ModuleThe intended use of this model is with the [Safety Checker](https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion/safety_checker.py) in Diffusers.This checker works by checking model inputs against known hard-coded NSFW concepts.Specifically, the checker compares the class probability of harmful concepts in the embedding space of the uploaded input images.The concepts are passed into the model with the image and compared to a hand-engineered weight for each NSFW concept.## Citation```@misc{liu2023zero1to3,title={Zero-1-to-3: Zero-shot One Image to 3D Object},author={Ruoshi Liu and Rundi Wu and Basile Van Hoorick and Pavel Tokmakov and Sergey Zakharov and Carl Vondrick},year={2023},eprint={2303.11328},archivePrefix={arXiv},primaryClass={cs.CV}}```
123456{ "_class_name": "CLIPCameraProjection", "_diffusers_version": "0.18.2", "additional_embeddings": 4, "embedding_dim": 768}123version https://git-lfs.github.com/spec/v1oid sha256:ac21fba01b5383ccae304dc34a5195c4882e8c533f253ee918f4245b9a8415e9size 1187512123version https://git-lfs.github.com/spec/v1oid sha256:f690e12a17cd5d9201e4ecfe27ab54fb2aeb926413fa46f8846a9a7550e62834size 237484012345678910111213141516171819202122232425262728{ "crop_size": { "height": 224, "width": 224 }, "do_center_crop": true, "do_convert_rgb": true, "do_normalize": true, "do_rescale": true, "do_resize": true, "feature_extractor_type": "CLIPFeatureExtractor", "image_mean": [ 0.48145466, 0.4578275, 0.40821073 ], "image_processor_type": "CLIPImageProcessor", "image_std": [ 0.26862954, 0.26130258, 0.27577711 ], "resample": 3, "rescale_factor": 0.00392156862745098, "size": { "shortest_edge": 224 }}1234567891011121314151617181920212223{ "_name_or_path": "lambdalabs/sd-image-variations-diffusers", "architectures": [ "CLIPVisionModelWithProjection" ], "attention_dropout": 0.0, "dropout": 0.0, "hidden_act": "quick_gelu", "hidden_size": 1024, "image_size": 224, "initializer_factor": 1.0, "initializer_range": 0.02, "intermediate_size": 4096, "layer_norm_eps": 1e-05, "model_type": "clip_vision_model", "num_attention_heads": 16, "num_channels": 3, "num_hidden_layers": 24, "patch_size": 14, "projection_dim": 768, "torch_dtype": "float32", "transformers_version": "4.30.2"}123version https://git-lfs.github.com/spec/v1oid sha256:0839dc3a0f2899f9b85df8cd64b8acd1a3303a95f73a895aced7c31aee7d80cfsize 607982256123version https://git-lfs.github.com/spec/v1oid sha256:e58ac58ff5110a60ce6a3ce28f89dc94dfb74ed88dd8a95fb72c7e3e80f2f780size 1215914880123456789101112131415161718192021222324252627282930313233{ "_class_name": "Zero123Pipeline", "_diffusers_version": "0.18.2", "clip_camera_projection": [ "diffusers", "CLIPCameraProjection" ], "feature_extractor": [ "transformers", "CLIPImageProcessor" ], "image_encoder": [ "transformers", "CLIPVisionModelWithProjection" ], "requires_safety_checker": false, "safety_checker": [ null, null ], "scheduler": [ "diffusers", "DDIMScheduler" ], "unet": [ "diffusers", "UNet2DConditionModel" ], "vae": [ "diffusers", "AutoencoderKL" ]}12345678910111213141516171819{ "_class_name": "DDIMScheduler", "_diffusers_version": "0.18.2", "beta_end": 0.012, "beta_schedule": "scaled_linear", "beta_start": 0.00085, "clip_sample": false, "clip_sample_range": 1.0, "dynamic_thresholding_ratio": 0.995, "num_train_timesteps": 1000, "prediction_type": "epsilon", "rescale_betas_zero_snr": false, "sample_max_value": 1.0, "set_alpha_to_one": false, "steps_offset": 1, "thresholding": false, "timestep_spacing": "leading", "trained_betas": null}12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364{ "_class_name": "UNet2DConditionModel", "_diffusers_version": "0.18.2", "act_fn": "silu", "addition_embed_type": null, "addition_embed_type_num_heads": 64, "addition_time_embed_dim": null, "attention_head_dim": 8, "block_out_channels": [ 320, 640, 1280, 1280 ], "center_input_sample": false, "class_embed_type": null, "class_embeddings_concat": false, "conv_in_kernel": 3, "conv_out_kernel": 3, "cross_attention_dim": 768, "cross_attention_norm": null, "down_block_types": [ "CrossAttnDownBlock2D", "CrossAttnDownBlock2D", "CrossAttnDownBlock2D", "DownBlock2D" ], "downsample_padding": 1, "dual_cross_attention": false, "encoder_hid_dim": null, "encoder_hid_dim_type": null, "flip_sin_to_cos": true, "freq_shift": 0, "in_channels": 8, "layers_per_block": 2, "mid_block_only_cross_attention": null, "mid_block_scale_factor": 1, "mid_block_type": "UNetMidBlock2DCrossAttn", "norm_eps": 1e-05, "norm_num_groups": 32, "num_attention_heads": null, "num_class_embeds": null, "only_cross_attention": false, "out_channels": 4, "projection_class_embeddings_input_dim": null, "resnet_out_scale_factor": 1.0, "resnet_skip_time_act": false, "resnet_time_scale_shift": "default", "sample_size": 32, "time_cond_proj_dim": null, "time_embedding_act_fn": null, "time_embedding_dim": null, "time_embedding_type": "positional", "timestep_post_act": null, "transformer_layers_per_block": 1, "up_block_types": [ "UpBlock2D", "CrossAttnUpBlock2D", "CrossAttnUpBlock2D", "CrossAttnUpBlock2D" ], "upcast_attention": null, "use_linear_projection": false}123version https://git-lfs.github.com/spec/v1oid sha256:d71f22edd261f34c34f94eaa51945448ccbee2fbd89949737fef65c2040df3a5size 1719148344123version https://git-lfs.github.com/spec/v1oid sha256:e02aac985cd1b910df5c668cf0b077d74558b018d2ac0aa3c064394215924068size 3438213624123456789101112131415161718192021222324252627282930{ "_class_name": "AutoencoderKL", "_diffusers_version": "0.18.2", "act_fn": "silu", "block_out_channels": [ 128, 256, 512, 512 ], "down_block_types": [ "DownEncoderBlock2D", "DownEncoderBlock2D", "DownEncoderBlock2D", "DownEncoderBlock2D" ], "in_channels": 3, "latent_channels": 4, "layers_per_block": 2, "norm_num_groups": 32, "out_channels": 3, "sample_size": 256, "scaling_factor": 0.18215, "up_block_types": [ "UpDecoderBlock2D", "UpDecoderBlock2D", "UpDecoderBlock2D", "UpDecoderBlock2D" ]}123version https://git-lfs.github.com/spec/v1oid sha256:3e4c08995484ee61270175e9e7a072b66a6e4eeb5f0c266667fe1f45b90daf9asize 167335342123version https://git-lfs.github.com/spec/v1oid sha256:2aa1f43011b553a4cba7f37456465cdbd48aab7b54b9348b890e8058ea7683ecsize 334643268README.md+69
clip_camera_projection/config.jsonAdded+6
clip_camera_projection/diffusion_pytorch_model.fp16.safetensorsAdded+3
clip_camera_projection/diffusion_pytorch_model.safetensorsAdded+3
feature_extractor/preprocessor_config.jsonAdded+28
image_encoder/config.jsonAdded+23
image_encoder/model.fp16.safetensorsAdded+3
image_encoder/model.safetensorsAdded+3
model_index.jsonAdded+33
scheduler/scheduler_config.jsonAdded+19
unet/config.jsonAdded+64
unet/diffusion_pytorch_model.fp16.safetensorsAdded+3
unet/diffusion_pytorch_model.safetensorsAdded+3
vae/config.jsonAdded+30
vae/diffusion_pytorch_model.fp16.safetensorsAdded+3
vae/diffusion_pytorch_model.safetensorsAdded+3