Downloads · 30 days
3
16% of all-time downloads
alibaba-pai/pai-diffusion-general-large-zh-controlnet-depth
pai-diffusion-general-large-zh-controlnet-depth is a text-to-image model from alibaba-pai. Use it when you need an image from a text prompt. It is set up for diffusers. The card lists the license as apache-2.0.
我们开源了适配模型 alibaba-pai/pai-diffusion-general-large-zh 的 ControlNet,输入图像的 Depth 特征,进行可控的生成。
Downloads · 30 days
3
16% of all-time downloads
All-time downloads
19
Public
Repo size
1.4 GB
Likes
0
Public
Click a slice to open those files.
.bin1.4 GB · 100%
From the Hugging Face model README
我们开源了适配模型 alibaba-pai/pai-diffusion-general-large-zh 的 ControlNet,输入图像的 Depth 特征,进行可控的生成。
from diffusers import StableDiffusionControlNetPipeline, ControlNetModel
controlnet_id = "alibaba-pai/pai-diffusion-general-large-zh-controlnet-depth"
controlnet = ControlNetModel.from_pretrained(controlnet_id)
model_id = "alibaba-pai/pai-diffusion-general-large-zh"
pipe = StableDiffusionControlNetPipeline.from_pretrained(model_id, controlnet=controlnet)
pipe = pipe.to("cuda")
image = Image.open("depth_image.png")
prompt = "雪地上的帐篷"
image = pipe(prompt, image).images[0]
image.save("result.png")