Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
diffusers
Commits
3584f6b3
Unverified
Commit
3584f6b3
authored
Mar 15, 2023
by
M. Tolga Cangöz
Committed by
GitHub
Mar 15, 2023
Browse files
Update img2img.mdx (#2688)
Fix typos
parent
b4bb5345
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
docs/source/en/using-diffusers/img2img.mdx
docs/source/en/using-diffusers/img2img.mdx
+6
-6
No files found.
docs/source/en/using-diffusers/img2img.mdx
View file @
3584f6b3
...
...
@@ -33,7 +33,7 @@ from io import BytesIO
from diffusers import StableDiffusionImg2ImgPipeline
```
Load the pipeline
Load the pipeline
:
```python
device = "cuda"
...
...
@@ -42,7 +42,7 @@ pipe = StableDiffusionImg2ImgPipeline.from_pretrained("runwayml/stable-diffusion
)
```
Download an initial image and preprocess it so we can pass it to the pipeline
.
Download an initial image and preprocess it so we can pass it to the pipeline
:
```python
url = "https://raw.githubusercontent.com/CompVis/stable-diffusion/main/assets/stable-samples/img2img/sketch-mountains-input.jpg"
...
...
@@ -55,7 +55,7 @@ init_image

Define the prompt and run the pipeline
.
Define the prompt and run the pipeline
:
```python
prompt = "A fantasy landscape, trending on artstation"
...
...
@@ -67,7 +67,7 @@ prompt = "A fantasy landscape, trending on artstation"
</Tip>
Let's generate two images with same pipeline and seed, but with different values for `strength`
Let's generate two images with same pipeline and seed, but with different values for `strength`
:
```python
generator = torch.Generator(device=device).manual_seed(1024)
...
...
@@ -89,9 +89,9 @@ image

As you can see, when using a lower value for `strength`, the generated image is more closer to the original `image`
As you can see, when using a lower value for `strength`, the generated image is more closer to the original `image`
.
Now let's use a different scheduler - [LMSDiscreteScheduler](https://huggingface.co/docs/diffusers/api/schedulers#diffusers.LMSDiscreteScheduler)
Now let's use a different scheduler - [LMSDiscreteScheduler](https://huggingface.co/docs/diffusers/api/schedulers#diffusers.LMSDiscreteScheduler)
:
```python
from diffusers import LMSDiscreteScheduler
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment