Skip to content

Commit 37d4299

Browse files
committed
docs: update docs to use image arg
1 parent 766c661 commit 37d4299

File tree

8 files changed

+13
-13
lines changed

8 files changed

+13
-13
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ init_image = init_image.resize((768, 512))
280280

281281
prompt = "A fantasy landscape, trending on artstation"
282282

283-
images = pipe(prompt=prompt, init_image=init_image, strength=0.75, guidance_scale=7.5).images
283+
images = pipe(prompt=prompt, image=init_image, strength=0.75, guidance_scale=7.5).images
284284

285285
images[0].save("fantasy_landscape.png")
286286
```

docs/source/api/pipelines/cycle_diffusion.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ prompt = "An astronaut riding an elephant"
5757
image = pipe(
5858
prompt=prompt,
5959
source_prompt=source_prompt,
60-
init_image=init_image,
60+
image=init_image,
6161
num_inference_steps=100,
6262
eta=0.1,
6363
strength=0.8,
@@ -83,7 +83,7 @@ torch.manual_seed(0)
8383
image = pipe(
8484
prompt=prompt,
8585
source_prompt=source_prompt,
86-
init_image=init_image,
86+
image=init_image,
8787
num_inference_steps=100,
8888
eta=0.1,
8989
strength=0.85,

docs/source/api/pipelines/overview.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ init_image = init_image.resize((768, 512))
142142

143143
prompt = "A fantasy landscape, trending on artstation"
144144

145-
images = pipe(prompt=prompt, init_image=init_image, strength=0.75, guidance_scale=7.5).images
145+
images = pipe(prompt=prompt, image=init_image, strength=0.75, guidance_scale=7.5).images
146146

147147
images[0].save("fantasy_landscape.png")
148148
```

docs/source/using-diffusers/custom_pipeline_examples.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ init_image = download_image(
177177

178178
prompt = "A fantasy landscape, trending on artstation"
179179

180-
images = pipe.img2img(prompt=prompt, init_image=init_image, strength=0.75, guidance_scale=7.5).images
180+
images = pipe.img2img(prompt=prompt, image=init_image, strength=0.75, guidance_scale=7.5).images
181181

182182
### Inpainting
183183

@@ -187,7 +187,7 @@ init_image = download_image(img_url).resize((512, 512))
187187
mask_image = download_image(mask_url).resize((512, 512))
188188

189189
prompt = "a cat sitting on a bench"
190-
images = pipe.inpaint(prompt=prompt, init_image=init_image, mask_image=mask_image, strength=0.75).images
190+
images = pipe.inpaint(prompt=prompt, image=init_image, mask_image=mask_image, strength=0.75).images
191191
```
192192

193193
As shown above this one pipeline can run all both "text-to-image", "image-to-image", and "inpainting" in one pipeline.

docs/source/using-diffusers/img2img.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ init_image.thumbnail((768, 768))
3737

3838
prompt = "A fantasy landscape, trending on artstation"
3939

40-
images = pipe(prompt=prompt, init_image=init_image, strength=0.75, guidance_scale=7.5).images
40+
images = pipe(prompt=prompt, image=init_image, strength=0.75, guidance_scale=7.5).images
4141

4242
images[0].save("fantasy_landscape.png")
4343
```

examples/community/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ init_image = download_image("https://raw.githubusercontent.com/CompVis/stable-di
165165

166166
prompt = "A fantasy landscape, trending on artstation"
167167

168-
images = pipe.img2img(prompt=prompt, init_image=init_image, strength=0.75, guidance_scale=7.5).images
168+
images = pipe.img2img(prompt=prompt, image=init_image, strength=0.75, guidance_scale=7.5).images
169169

170170
### Inpainting
171171

@@ -175,7 +175,7 @@ init_image = download_image(img_url).resize((512, 512))
175175
mask_image = download_image(mask_url).resize((512, 512))
176176

177177
prompt = "a cat sitting on a bench"
178-
images = pipe.inpaint(prompt=prompt, init_image=init_image, mask_image=mask_image, strength=0.75).images
178+
images = pipe.inpaint(prompt=prompt, image=init_image, mask_image=mask_image, strength=0.75).images
179179
```
180180

181181
As shown above this one pipeline can run all both "text-to-image", "image-to-image", and "inpainting" in one pipeline.
@@ -419,7 +419,7 @@ init_image = Image.open(BytesIO(response.content)).convert("RGB")
419419
init_image = init_image.resize((512, 512))
420420
res = pipe.train(
421421
prompt,
422-
init_image,
422+
image=init_image,
423423
guidance_scale=7.5,
424424
num_inference_steps=50,
425425
generator=generator)

src/diffusers/pipelines/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ init_image = init_image.resize((768, 512))
126126

127127
prompt = "A fantasy landscape, trending on artstation"
128128

129-
images = pipe(prompt=prompt, init_image=init_image, strength=0.75, guidance_scale=7.5).images
129+
images = pipe(prompt=prompt, image=init_image, strength=0.75, guidance_scale=7.5).images
130130

131131
images[0].save("fantasy_landscape.png")
132132
```

src/diffusers/pipelines/stable_diffusion/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ prompt = "An astronaut riding an elephant"
138138
image = pipe(
139139
prompt=prompt,
140140
source_prompt=source_prompt,
141-
init_image=init_image,
141+
image=init_image,
142142
num_inference_steps=100,
143143
eta=0.1,
144144
strength=0.8,
@@ -164,7 +164,7 @@ torch.manual_seed(0)
164164
image = pipe(
165165
prompt=prompt,
166166
source_prompt=source_prompt,
167-
init_image=init_image,
167+
image=init_image,
168168
num_inference_steps=100,
169169
eta=0.1,
170170
strength=0.85,

0 commit comments

Comments
 (0)