import torch
from diffusers import StableDiffusion3ControlNetPipeline
from diffusers.models import SD3ControlNetModel, SD3MultiControlNetModel
from diffusers.utils import load_image
# load pipeline
controlnet = SD3ControlNetModel.from_pretrained("InstantX/SD3-Controlnet-Depth")
pipe = StableDiffusion3ControlNetPipeline.from_pretrained(
"stabilityai/stable-diffusion-3-medium-diffusers",
controlnet=controlnet
)
pipe.to("cuda", torch.float16)
# config
control_image = load_image("https://huggingface.co/InstantX/SD3-Controlnet-Depth/resolve/main/images/depth.jpeg")
prompt = "a panda cub, captured in a close-up, in forest, is perched on a tree trunk. good composition, Photography, the cub's ears, a fluffy black, are tucked behind its head, adding a touch of whimsy to its appearance. a lush tapestry of green leaves in the background. depth of field, National Geographic"
n_prompt = "bad hands, blurry, NSFW, nude, naked, porn, ugly, bad quality, worst quality"# to reproduce result in our example
generator = torch.Generator(device="cpu").manual_seed(4000)
image = pipe(
prompt,
negative_prompt=n_prompt,
control_image=control_image,
controlnet_conditioning_scale=0.5,
guidance_scale=7.0,
generator=generator
).images[0]
image.save('image.jpg')
Limitation
Due to the fact that only 1024*1024 pixel resolution was used during the training phase, the inference performs best at this size, with other sizes yielding suboptimal results.
Runs of InstantX SD3-Controlnet-Depth on huggingface.co
35
Total runs
3
24-hour runs
7
3-day runs
7
7-day runs
-6
30-day runs
More Information About SD3-Controlnet-Depth huggingface.co Model
SD3-Controlnet-Depth huggingface.co is an AI model on huggingface.co that provides SD3-Controlnet-Depth's model effect (), which can be used instantly with this InstantX SD3-Controlnet-Depth model. huggingface.co supports a free trial of the SD3-Controlnet-Depth model, and also provides paid use of the SD3-Controlnet-Depth. Support call SD3-Controlnet-Depth model through api, including Node.js, Python, http.
SD3-Controlnet-Depth huggingface.co is an online trial and call api platform, which integrates SD3-Controlnet-Depth's modeling effects, including api services, and provides a free online trial of SD3-Controlnet-Depth, you can try SD3-Controlnet-Depth online for free by clicking the link below.
InstantX SD3-Controlnet-Depth online free url in huggingface.co:
SD3-Controlnet-Depth is an open source model from GitHub that offers a free installation service, and any user can find SD3-Controlnet-Depth on GitHub to install. At the same time, huggingface.co provides the effect of SD3-Controlnet-Depth install, users can directly use SD3-Controlnet-Depth installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
SD3-Controlnet-Depth install url in huggingface.co: