mirror of
https://github.com/huggingface/diffusers.git
synced 2026-01-27 17:22:53 +03:00
Update code example in pipeline_stable_unclip_img2img.py EXAMPLE_DOC_STRING (#8401)
Update code example in pipeline_stable_unclip_img2img.py Previous code caused an error when run
This commit is contained in:
@@ -51,8 +51,8 @@ EXAMPLE_DOC_STRING = """
|
||||
>>> from diffusers import StableUnCLIPImg2ImgPipeline
|
||||
|
||||
>>> pipe = StableUnCLIPImg2ImgPipeline.from_pretrained(
|
||||
... "fusing/stable-unclip-2-1-l-img2img", torch_dtype=torch.float16
|
||||
... ) # TODO update model path
|
||||
... "stabilityai/stable-diffusion-2-1-unclip-small", torch_dtype=torch.float16
|
||||
... )
|
||||
>>> pipe = pipe.to("cuda")
|
||||
|
||||
>>> url = "https://raw.githubusercontent.com/CompVis/stable-diffusion/main/assets/stable-samples/img2img/sketch-mountains-input.jpg"
|
||||
@@ -63,7 +63,7 @@ EXAMPLE_DOC_STRING = """
|
||||
|
||||
>>> prompt = "A fantasy landscape, trending on artstation"
|
||||
|
||||
>>> images = pipe(prompt, init_image).images
|
||||
>>> images = pipe(init_image, prompt).images
|
||||
>>> images[0].save("fantasy_landscape.png")
|
||||
```
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user