Instructions to use Adapter/t2iadapter with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Adapter/t2iadapter with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("Adapter/t2iadapter", dtype=torch.bfloat16, device_map="cuda") prompt = "Turn this cat into a dog" input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png") image = pipe(image=input_image, prompt=prompt).images[0] - Notebooks
- Google Colab
- Kaggle
| license: apache-2.0 | |
| base_model: stabilityai/stable-diffusion-xl-base-1.0 | |
| tags: | |
| - art | |
| - t2i-adapter | |
| - stable-diffusion | |
| - image-to-image | |
| # T2I Adapter - SDXL | |
| T2I Adapter is a network providing additional conditioning to stable diffusion. Each t2i checkpoint takes a different type of conditioning as input and is used with a specific base stable diffusion checkpoint. | |
| This checkpoint provides conditioning on sketches for the stable diffusion XL checkpoint. | |
| ## The Original Recipe Drives SDXL. | |
| | | SD-V1.4/1.5 | SD-XL | T2I-Adapter | T2I-Adapter-SDXL | | |
| | --- | --- |--- |--- |--- | | |
| | Parameters | 860M | 2.6B |77 M | 77 M | | | |
| ## Examples and Comparison | |
| - Keypoint-guided | |
| <p align="center"> | |
| <img src="https://huggingface.co/TencentARC/T2I-Adapter/resolve/main/assets_XL/g_pose2.png" height=520> | |
| </p> | |
| - Sketch-guided | |
| <p align="center"> | |
| <img src="https://huggingface.co/TencentARC/T2I-Adapter/resolve/main/assets_XL/g_sketch.PNG" height=520> | |
| </p> | |
| - Canny-guided | |
| <p align="center"> | |
| <img src="https://huggingface.co/TencentARC/T2I-Adapter/resolve/main/assets_XL/g_canny.png" height=520> | |
| </p> |