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
fed88195
Unverified
Commit
fed88195
authored
Aug 26, 2023
by
Steven Liu
Committed by
GitHub
Aug 26, 2023
Browse files
[docs] Fix syntax for compel (#4794)
* fix syntax * update image
parent
0de35e4a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
docs/source/en/using-diffusers/weighted_prompts.md
docs/source/en/using-diffusers/weighted_prompts.md
+2
-2
No files found.
docs/source/en/using-diffusers/weighted_prompts.md
View file @
fed88195
...
...
@@ -143,8 +143,8 @@ image
A conjunction diffuses each prompt independently and concatenates their results by their weighted sum. Add
`.and()`
to the end of a list of prompts to create a conjunction:
```
py
prompt_embeds
=
compel_proc
(
'
(
"a red cat, playing with a, ball"
)
.and()'
)
generator
=
torch
.
Generator
(
device
=
"cuda"
).
manual_seed
(
33
)
prompt_embeds
=
compel_proc
(
'
[
"a red cat
"
,
"
playing with a
"
,
"
ball"
]
.and()'
)
generator
=
torch
.
Generator
(
device
=
"cuda"
).
manual_seed
(
55
)
image
=
pipe
(
prompt_embeds
=
prompt_embeds
,
generator
=
generator
,
num_inference_steps
=
20
).
images
[
0
]
image
...
...
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