Skip to content

Commit c636c76

Browse files
committed
add to doc
1 parent 7f2b21b commit c636c76

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/diffusers/pipelines/sana/pipeline_sana_sprint_img2img.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,20 @@
6464
```py
6565
>>> import torch
6666
>>> from diffusers import SanaSprintImg2ImgPipeline
67+
>>> from diffusers.utils.loading_utils import load_image
6768
6869
>>> pipe = SanaSprintImg2ImgPipeline.from_pretrained(
6970
... "Efficient-Large-Model/Sana_Sprint_1.6B_1024px_diffusers", torch_dtype=torch.bfloat16
7071
... )
7172
>>> pipe.to("cuda")
73+
74+
>>> image = load_image(
75+
... "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/penguin.png")
76+
)
7277
73-
>>> image = pipe(prompt="a tiny astronaut hatching from an egg on the moon")[0]
78+
>>> image = pipe(prompt="a cute pink bear",
79+
... image=image,
80+
... strength=0.5, height=832, width=480).images[0]
7481
>>> image[0].save("output.png")
7582
```
7683
"""

0 commit comments

Comments
 (0)