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
renzhc
diffusers_dcu
Commits
f9522d82
Unverified
Commit
f9522d82
authored
Aug 17, 2022
by
Suraj Patil
Committed by
GitHub
Aug 17, 2022
Browse files
[StableDiffusionPipeline] use default params in __call__ (#196)
use default params in __call__
parent
80e0c8ba
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
README.md
README.md
+1
-1
src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py
...s/pipelines/stable_diffusion/pipeline_stable_diffusion.py
+1
-1
No files found.
README.md
View file @
f9522d82
...
...
@@ -60,7 +60,7 @@ pipe = StableDiffusionPipeline.from_pretrained(
prompt
=
"a photo of an astronaut riding a horse on mars"
with
autocast
(
"cuda"
):
image
=
pipe
(
prompt
,
width
=
512
,
guidance_scale
=
7.5
)[
"sample"
][
0
]
image
=
pipe
(
prompt
)[
"sample"
][
0
]
image
.
save
(
"astronaut_rides_horse.png"
)
```
...
...
src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py
View file @
f9522d82
...
...
@@ -31,7 +31,7 @@ class StableDiffusionPipeline(DiffusionPipeline):
height
:
Optional
[
int
]
=
512
,
width
:
Optional
[
int
]
=
512
,
num_inference_steps
:
Optional
[
int
]
=
50
,
guidance_scale
:
Optional
[
float
]
=
1.0
,
guidance_scale
:
Optional
[
float
]
=
7.5
,
eta
:
Optional
[
float
]
=
0.0
,
generator
:
Optional
[
torch
.
Generator
]
=
None
,
torch_device
:
Optional
[
Union
[
str
,
torch
.
device
]]
=
None
,
...
...
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