Text-to-3D
Diffusers
Safetensors
English
StableDiffusionUpscaleLDM3DPipeline
stable-diffusion
stable-diffusion-diffusers
text-to-image
Eval Results (legacy)
Instructions to use Intel/ldm3d-sr with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Intel/ldm3d-sr with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("Intel/ldm3d-sr", 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
Update README.md
Browse files
README.md
CHANGED
|
@@ -30,6 +30,12 @@ import torch
|
|
| 30 |
from diffusers import StableDiffusionUpscaleLDM3DPipeline, StableDiffusionLDM3DPipeline
|
| 31 |
|
| 32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
#Generate a rgb/depth output from LDM3D
|
| 34 |
pipe_ldm3d = StableDiffusionLDM3DPipeline.from_pretrained("Intel/ldm3d-4c")
|
| 35 |
pipe_ldm3d.to("cuda")
|
|
@@ -42,7 +48,8 @@ depth_image[0].save(f"lemons_ldm3d_depth.png")
|
|
| 42 |
|
| 43 |
|
| 44 |
#Upscale the previous output to a resolution of (1024, 1024)
|
| 45 |
-
pipe_ldm3d_upscale =
|
|
|
|
| 46 |
pipe_ldm3d_upscale.to("cuda")
|
| 47 |
|
| 48 |
low_res_img = Image.open(f"lemons_ldm3d_rgb.jpg").convert("RGB")
|
|
|
|
| 30 |
from diffusers import StableDiffusionUpscaleLDM3DPipeline, StableDiffusionLDM3DPipeline
|
| 31 |
|
| 32 |
|
| 33 |
+
#Generate a rgb/depth output from LDM3D
|
| 34 |
+
from PIL import Image
|
| 35 |
+
import os
|
| 36 |
+
import torch
|
| 37 |
+
from diffusers import StableDiffusionLDM3DPipeline, DiffusionPipeline
|
| 38 |
+
|
| 39 |
#Generate a rgb/depth output from LDM3D
|
| 40 |
pipe_ldm3d = StableDiffusionLDM3DPipeline.from_pretrained("Intel/ldm3d-4c")
|
| 41 |
pipe_ldm3d.to("cuda")
|
|
|
|
| 48 |
|
| 49 |
|
| 50 |
#Upscale the previous output to a resolution of (1024, 1024)
|
| 51 |
+
pipe_ldm3d_upscale = DiffusionPipeline.from_pretrained("Intel/ldm3d-sr", custom_pipeline="pipeline_stable_diffusion_upscale_ldm3d")
|
| 52 |
+
|
| 53 |
pipe_ldm3d_upscale.to("cuda")
|
| 54 |
|
| 55 |
low_res_img = Image.open(f"lemons_ldm3d_rgb.jpg").convert("RGB")
|