Instructions to use hf-internal-testing/tiny-stable-diffusion-pix2pix with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use hf-internal-testing/tiny-stable-diffusion-pix2pix 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("hf-internal-testing/tiny-stable-diffusion-pix2pix", 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
Commit ·
a6eaa35
1
Parent(s): 651c95b
Update unet/config.json
Browse files- unet/config.json +1 -1
unet/config.json
CHANGED
|
@@ -12,7 +12,7 @@
|
|
| 12 |
"CrossAttnDownBlock2D"
|
| 13 |
],
|
| 14 |
"dropout": 0.0,
|
| 15 |
-
"in_channels":
|
| 16 |
"layers_per_block": 2,
|
| 17 |
"out_channels": 4,
|
| 18 |
"sample_size": 32,
|
|
|
|
| 12 |
"CrossAttnDownBlock2D"
|
| 13 |
],
|
| 14 |
"dropout": 0.0,
|
| 15 |
+
"in_channels": 8,
|
| 16 |
"layers_per_block": 2,
|
| 17 |
"out_channels": 4,
|
| 18 |
"sample_size": 32,
|