1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-01-27 17:22:53 +03:00

Correct Pix2Pix example (#2056)

* Correct Pix2Pix example

- no advertisement of revision -> it'll be deprecated soon
- by default safety checker should be used

* Update docs/source/en/api/pipelines/stable_diffusion/pix2pix.mdx

* up
This commit is contained in:
Patrick von Platen
2023-01-21 16:56:29 +02:00
committed by GitHub
parent 59b7339a84
commit 8d326e61cf

View File

@@ -46,7 +46,7 @@ from diffusers import StableDiffusionInstructPix2PixPipeline
model_id = "timbrooks/instruct-pix2pix"
pipe = StableDiffusionInstructPix2PixPipeline.from_pretrained(
model_id, torch_dtype=torch.float16, revision="fp16", safety_checker=None
model_id, torch_dtype=torch.float16, safety_checker=None
).to("cuda")
url = "https://raw.githubusercontent.com/timothybrooks/instruct-pix2pix/main/imgs/example.jpg"