
# LDM3D model

The LDM3D model was proposed in ["LDM3D: Latent Diffusion Model for 3D"](https://arxiv.org/abs/2305.10853) by Gabriela Ben Melech Stan, Diana Wofk, Scottie Fox, Alex Redden, Will Saxton, Jean Yu, Estelle Aflalo, Shao-Yen Tseng, Fabio Nonato, Matthias Muller, Vasudev Lal.

LDM3D got accepted to [CVPRW'23]([https://aaai.org/Conferences/AAAI-23/](https://cvpr2023.thecvf.com/)).

For better results, do not hesitate to use [our new checkpoint](https://huggingface.co/Intel/ldm3d-4c) based on a slighlty different architecture.

New checkpoints have been released:
- [ldm3d-4c](https://huggingface.co/Intel/ldm3d-4c). A new version of LDM3D with higher quality results
- [ldm3d-pano](https://huggingface.co/Intel/ldm3d-pano). LDM3D applied to panoramic images
- [ldm3d-sr](https://huggingface.co/Intel/ldm3d-sr). Upscaler for LDM3D

## Model description

The abstract from the paper is the following:
This research paper proposes a Latent Diffusion Model for 3D (LDM3D) that generates both image and depth map data from a given text prompt, allowing users to generate RGBD images from text prompts. The LDM3D model is fine-tuned on a dataset of tuples containing an RGB image, depth map and caption, and validated through extensive experiments. We also develop an application called DepthFusion, which uses the img2img pipeline to create immersive and interactive 360-degree-view experiences using TouchDesigner. This technology has the potential to transform a wide range of industries, from entertainment and gaming to architecture and design. Overall, this paper presents a significant contribution to the field of generative AI and computer vision, and showcases the potential of LDM3D and DepthFusion to revolutionize content creation and digital experiences.

![LDM3D overview](model_overview.png)
<font size="2">LDM3D overview taken from [the original paper](https://arxiv.org/abs/2305.10853)</font>

## Intended uses

You can use this model to generate RGB and depth map given a text prompt.
A short video summarizing the approach can be found at [this url](https://t.ly/tdi2) and a VR demo can be found [here](https://www.youtube.com/watch?v=3hbUo-hwAs0).
A demo is also accessible on [Spaces](https://huggingface.co/spaces/Intel/ldm3d)

### How to use

Here is how to use this model to get the features of a given text in PyTorch:
```python

from diffusers import StableDiffusionLDM3DPipeline

pipe = StableDiffusionLDM3DPipeline.from_pretrained("Intel/ldm3d")
pipe.to("cuda")


prompt ="A picture of some lemons on a table"
name = "lemons"

output = pipe(prompt)
rgb_image, depth_image = output.rgb, output.depth
rgb_image[0].save(name+"_ldm3d_rgb.jpg")
depth_image[0].save(name+"_ldm3d_depth.png")
```

This is the result:

![ldm3d_results](ldm3d_results.png)


### Limitations and bias

For the image generation, limitations and bias are the same as the ones from [Stable diffusion](https://huggingface.co/CompVis/stable-diffusion-v1-4#limitations)
For the depth map generation, a first limitiation is that we are using DPT-large to produce the ground truth, hence, other limitations and bias are the same as the ones from [DPT](https://huggingface.co/Intel/dpt-large).


## Training data

The LDM3D model was finetuned on a dataset constructed from a subset of the LAION-400M dataset, a large-scale image-caption dataset that contains over 400 million image-caption pairs.

### Finetuning

The fine-tuning process comprises two stages. In the first stage, we train an autoencoder to generate a lower-dimensional, perceptually equivalent data representation. Subsequently, we fine-tune the diffusion model using the frozen autoencoder

## Evaluation results

Please refer to Table 1 and Table2 from the [paper](https://arxiv.org/abs/2305.10853) for quantitative results.
The figure below shows some qualitative results comparing our method with (Stable diffusion v1.4)[https://arxiv.org/pdf/2112.10752.pdf] and with (DPT-Large)[https://arxiv.org/pdf/2103.13413.pdf] for the depth maps
![qualitative results](qualitative_results.png)

### BibTeX entry and citation info
```bibtex
@misc{stan2023ldm3d,
	title={LDM3D: Latent Diffusion Model for 3D},
	author={Gabriela Ben Melech Stan and Diana Wofk and Scottie Fox and Alex Redden and Will Saxton and Jean Yu and Estelle Aflalo and Shao-Yen Tseng and Fabio Nonato and Matthias Muller and Vasudev Lal},
	year={2023},
	eprint={2305.10853},
	archivePrefix={arXiv},
	primaryClass={cs.CV}
}
```
{"language": ["en"], "license": "creativeml-openrail-m", "tags": ["stable-diffusion", "stable-diffusion-diffusers", "text-to-image"], "datasets": ["laion/laion400m"], "pipeline_tag": "text-to-3d"}
diffusers safetensors stable-diffusion stable-diffusion-diffusers text-to-image text-to-3d en dataset:laion/laion400m arxiv:2305.10853 arxiv:2112.10752 arxiv:2103.13413 license:creativeml-openrail-m has_space diffusers:StableDiffusionLDM3DPipeline region:us
TAGS
#diffusers #safetensors #stable-diffusion #stable-diffusion-diffusers #text-to-image #text-to-3d #en #dataset-laion/laion400m #arxiv-2305.10853 #arxiv-2112.10752 #arxiv-2103.13413 #license-creativeml-openrail-m #has_space #diffusers-StableDiffusionLDM3DPipeline #region-us 


# LDM3D model

The LDM3D model was proposed in "LDM3D: Latent Diffusion Model for 3D" by Gabriela Ben Melech Stan, Diana Wofk, Scottie Fox, Alex Redden, Will Saxton, Jean Yu, Estelle Aflalo, Shao-Yen Tseng, Fabio Nonato, Matthias Muller, Vasudev Lal.

LDM3D got accepted to CVPRW'23).

For better results, do not hesitate to use our new checkpoint based on a slighlty different architecture.

New checkpoints have been released:
- ldm3d-4c. A new version of LDM3D with higher quality results
- ldm3d-pano. LDM3D applied to panoramic images
- ldm3d-sr. Upscaler for LDM3D

## Model description

The abstract from the paper is the following:
This research paper proposes a Latent Diffusion Model for 3D (LDM3D) that generates both image and depth map data from a given text prompt, allowing users to generate RGBD images from text prompts. The LDM3D model is fine-tuned on a dataset of tuples containing an RGB image, depth map and caption, and validated through extensive experiments. We also develop an application called DepthFusion, which uses the img2img pipeline to create immersive and interactive 360-degree-view experiences using TouchDesigner. This technology has the potential to transform a wide range of industries, from entertainment and gaming to architecture and design. Overall, this paper presents a significant contribution to the field of generative AI and computer vision, and showcases the potential of LDM3D and DepthFusion to revolutionize content creation and digital experiences.

!LDM3D overview
<font size="2">LDM3D overview taken from the original paper</font>

## Intended uses

You can use this model to generate RGB and depth map given a text prompt.
A short video summarizing the approach can be found at this url and a VR demo can be found here.
A demo is also accessible on Spaces

### How to use

Here is how to use this model to get the features of a given text in PyTorch:


This is the result:

!ldm3d_results


### Limitations and bias

For the image generation, limitations and bias are the same as the ones from Stable diffusion
For the depth map generation, a first limitiation is that we are using DPT-large to produce the ground truth, hence, other limitations and bias are the same as the ones from DPT.


## Training data

The LDM3D model was finetuned on a dataset constructed from a subset of the LAION-400M dataset, a large-scale image-caption dataset that contains over 400 million image-caption pairs.

### Finetuning

The fine-tuning process comprises two stages. In the first stage, we train an autoencoder to generate a lower-dimensional, perceptually equivalent data representation. Subsequently, we fine-tune the diffusion model using the frozen autoencoder

## Evaluation results

Please refer to Table 1 and Table2 from the paper for quantitative results.
The figure below shows some qualitative results comparing our method with (Stable diffusion v1.4)[URL and with (DPT-Large)[URL for the depth maps
!qualitative results

### BibTeX entry and citation info

# LDM3D model

The LDM3D model was proposed in "LDM3D: Latent Diffusion Model for 3D" by Gabriela Ben Melech Stan, Diana Wofk, Scottie Fox, Alex Redden, Will Saxton, Jean Yu, Estelle Aflalo, Shao-Yen Tseng, Fabio Nonato, Matthias Muller, Vasudev Lal.

LDM3D got accepted to CVPRW'23).

For better results, do not hesitate to use our new checkpoint based on a slighlty different architecture.

New checkpoints have been released:
- ldm3d-4c. A new version of LDM3D with higher quality results
- ldm3d-pano. LDM3D applied to panoramic images
- ldm3d-sr. Upscaler for LDM3D ## Model description

The abstract from the paper is the following:
This research paper proposes a Latent Diffusion Model for 3D (LDM3D) that generates both image and depth map data from a given text prompt, allowing users to generate RGBD images from text prompts. The LDM3D model is fine-tuned on a dataset of tuples containing an RGB image, depth map and caption, and validated through extensive experiments. We also develop an application called DepthFusion, which uses the img2img pipeline to create immersive and interactive 360-degree-view experiences using TouchDesigner. This technology has the potential to transform a wide range of industries, from entertainment and gaming to architecture and design. Overall, this paper presents a significant contribution to the field of generative AI and computer vision, and showcases the potential of LDM3D and DepthFusion to revolutionize content creation and digital experiences.

!LDM3D overview
<font size="2">LDM3D overview taken from the original paper</font> ## Intended uses

You can use this model to generate RGB and depth map given a text prompt.
A short video summarizing the approach can be found at this url and a VR demo can be found here.
A demo is also accessible on Spaces ### How to use

Here is how to use this model to get the features of a given text in PyTorch:


This is the result:

!ldm3d_results ### Limitations and bias

For the image generation, limitations and bias are the same as the ones from Stable diffusion
For the depth map generation, a first limitiation is that we are using DPT-large to produce the ground truth, hence, other limitations and bias are the same as the ones from DPT. ## Training data

The LDM3D model was finetuned on a dataset constructed from a subset of the LAION-400M dataset, a large-scale image-caption dataset that contains over 400 million image-caption pairs. ### Finetuning

The fine-tuning process comprises two stages. In the first stage, we train an autoencoder to generate a lower-dimensional, perceptually equivalent data representation. Subsequently, we fine-tune the diffusion model using the frozen autoencoder ## Evaluation results

Please refer to Table 1 and Table2 from the paper for quantitative results.
The figure below shows some qualitative results comparing our method with (Stable diffusion v1.4)[URL and with (DPT-Large)[URL for the depth maps
!qualitative results ### BibTeX entry and citation info
TAGS
#diffusers #safetensors #stable-diffusion #stable-diffusion-diffusers #text-to-image #text-to-3d #en #dataset-laion/laion400m #arxiv-2305.10853 #arxiv-2112.10752 #arxiv-2103.13413 #license-creativeml-openrail-m #has_space #diffusers-StableDiffusionLDM3DPipeline #region-us 
 # LDM3D model

The LDM3D model was proposed in "LDM3D: Latent Diffusion Model for 3D" by Gabriela Ben Melech Stan, Diana Wofk, Scottie Fox, Alex Redden, Will Saxton, Jean Yu, Estelle Aflalo, Shao-Yen Tseng, Fabio Nonato, Matthias Muller, Vasudev Lal.

LDM3D got accepted to CVPRW'23).

For better results, do not hesitate to use our new checkpoint based on a slighlty different architecture.

New checkpoints have been released:
- ldm3d-4c. A new version of LDM3D with higher quality results
- ldm3d-pano. LDM3D applied to panoramic images
- ldm3d-sr. Upscaler for LDM3D ## Model description

The abstract from the paper is the following:
This research paper proposes a Latent Diffusion Model for 3D (LDM3D) that generates both image and depth map data from a given text prompt, allowing users to generate RGBD images from text prompts. The LDM3D model is fine-tuned on a dataset of tuples containing an RGB image, depth map and caption, and validated through extensive experiments. We also develop an application called DepthFusion, which uses the img2img pipeline to create immersive and interactive 360-degree-view experiences using TouchDesigner. This technology has the potential to transform a wide range of industries, from entertainment and gaming to architecture and design. Overall, this paper presents a significant contribution to the field of generative AI and computer vision, and showcases the potential of LDM3D and DepthFusion to revolutionize content creation and digital experiences.

!LDM3D overview
<font size="2">LDM3D overview taken from the original paper</font> ## Intended uses

You can use this model to generate RGB and depth map given a text prompt.
A short video summarizing the approach can be found at this url and a VR demo can be found here.
A demo is also accessible on Spaces ### How to use

Here is how to use this model to get the features of a given text in PyTorch:


This is the result:

!ldm3d_results ### Limitations and bias

For the image generation, limitations and bias are the same as the ones from Stable diffusion
For the depth map generation, a first limitiation is that we are using DPT-large to produce the ground truth, hence, other limitations and bias are the same as the ones from DPT. ## Training data

The LDM3D model was finetuned on a dataset constructed from a subset of the LAION-400M dataset, a large-scale image-caption dataset that contains over 400 million image-caption pairs. ### Finetuning

The fine-tuning process comprises two stages. In the first stage, we train an autoencoder to generate a lower-dimensional, perceptually equivalent data representation. Subsequently, we fine-tune the diffusion model using the frozen autoencoder ## Evaluation results

Please refer to Table 1 and Table2 from the paper for quantitative results.
The figure below shows some qualitative results comparing our method with (Stable diffusion v1.4)[URL and with (DPT-Large)[URL for the depth maps
!qualitative results ### BibTeX entry and citation info