Image-to-Image
Diffusers
StableDiffusionInstructPix2PixPipeline
stable-diffusion
stable-diffusion-diffusers
Instructions to use instruction-tuning-sd/low-level-img-proc with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use instruction-tuning-sd/low-level-img-proc 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("instruction-tuning-sd/low-level-img-proc", 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
Update README.md
Browse files
README.md
CHANGED
|
@@ -15,7 +15,8 @@ datasets:
|
|
| 15 |
|
| 16 |
# Instruction-tuned Stable Diffusion for Low-level Image Processing (Fine-tuned)
|
| 17 |
|
| 18 |
-
|
|
|
|
| 19 |
|
| 20 |
## Pipeline description
|
| 21 |
|
|
@@ -53,7 +54,7 @@ import torch
|
|
| 53 |
from diffusers import StableDiffusionInstructPix2PixPipeline
|
| 54 |
from diffusers.utils import load_image
|
| 55 |
|
| 56 |
-
model_id = "instruction-tuning-sd/
|
| 57 |
pipeline = StableDiffusionInstructPix2PixPipeline.from_pretrained(
|
| 58 |
model_id, torch_dtype=torch.float16, use_auth_token=True
|
| 59 |
).to("cuda")
|
|
|
|
| 15 |
|
| 16 |
# Instruction-tuned Stable Diffusion for Low-level Image Processing (Fine-tuned)
|
| 17 |
|
| 18 |
+
This pipeline is an 'instruction-tuned' version of [Stable Diffusion (v1.5)](https://huggingface.co/runwayml/stable-diffusion-v1-5). It was
|
| 19 |
+
fine-tuned from the existing [InstructPix2Pix checkpoints](https://huggingface.co/timbrooks/instruct-pix2pix).
|
| 20 |
|
| 21 |
## Pipeline description
|
| 22 |
|
|
|
|
| 54 |
from diffusers import StableDiffusionInstructPix2PixPipeline
|
| 55 |
from diffusers.utils import load_image
|
| 56 |
|
| 57 |
+
model_id = "instruction-tuning-sd/low-level-img-proc"
|
| 58 |
pipeline = StableDiffusionInstructPix2PixPipeline.from_pretrained(
|
| 59 |
model_id, torch_dtype=torch.float16, use_auth_token=True
|
| 60 |
).to("cuda")
|