Views
No views yet
| Model Name | Control Image Overview | Control Image Example | Generated Image Example |
|---|---|---|---|
| TencentARC/t2iadapter_color_sd14v1 Trained with spatial color palette | A image with 8x8 color palette. | ![]() | ![]() |
| TencentARC/t2iadapter_canny_sd14v1 Trained with canny edge detection | A monochrome image with white edges on a black background. | ![]() | ![]() |
| TencentARC/t2iadapter_sketch_sd14v1 Trained with PidiNet edge detection | A hand-drawn monochrome image with white outlines on a black background. | ![]() | ![]() |
| TencentARC/t2iadapter_depth_sd14v1 Trained with Midas depth estimation | A grayscale image with black representing deep areas and white representing shallow areas. | ![]() | ![]() |
| TencentARC/t2iadapter_openpose_sd14v1 Trained with OpenPose bone image | A OpenPose bone image. | ![]() | ![]() |
| TencentARC/t2iadapter_keypose_sd14v1 Trained with mmpose skeleton image | A mmpose skeleton image. | ![]() | ![]() |
| TencentARC/t2iadapter_seg_sd14v1 Trained with semantic segmentation | An custom segmentation protocol image. | ![]() | ![]() |
| TencentARC/t2iadapter_canny_sd15v2 | |||
| TencentARC/t2iadapter_depth_sd15v2 | |||
| TencentARC/t2iadapter_sketch_sd15v2 | |||
| TencentARC/t2iadapter_zoedepth_sd15v1 |
pip install diffusers transformers controlnet_aux1from PIL import Image
2from diffusers import T2IAdapter, StableDiffusionAdapterPipeline
3import torch
4from controlnet_aux import OpenposeDetector
5
6openpose = OpenposeDetector.from_pretrained('lllyasviel/ControlNet')
7
8image = Image.open('./images/openpose_input.png')
9
10image = openpose(image)
11
12image.save('./images/openpose.png')
13
14adapter = T2IAdapter.from_pretrained("TencentARC/t2iadapter_openpose_sd14v1", torch_dtype=torch.float16)
15pipe = StableDiffusionAdapterPipeline.from_pretrained(
16 "CompVis/stable-diffusion-v1-4", adapter=adapter, safety_checker=None, torch_dtype=torch.float16, variant="fp16"
17)
18
19pipe.to('cuda')
20
21generator = torch.Generator().manual_seed(1)
22
23openpose_out = pipe(prompt="iron man flying", image=image, generator=generator).images[0]
24
25openpose_out.save('./images/openpose_out.png')

