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
05361960
Unverified
Commit
05361960
authored
Jun 09, 2023
by
YiYi Xu
Committed by
GitHub
Jun 09, 2023
Browse files
remove seed (#3734)
* remove seed * style --------- Co-authored-by:
yiyixuxu
<
yixu310@gmail,com
>
parent
c42f6ee4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
docs/source/en/api/pipelines/kandinsky.mdx
docs/source/en/api/pipelines/kandinsky.mdx
+6
-6
No files found.
docs/source/en/api/pipelines/kandinsky.mdx
View file @
05361960
...
@@ -60,8 +60,7 @@ returns both the image embeddings corresponding to the prompt and negative/uncon
...
@@ -60,8 +60,7 @@ returns both the image embeddings corresponding to the prompt and negative/uncon
embeddings corresponding to an empty string.
embeddings corresponding to an empty string.
```py
```py
generator = torch.Generator(device="cuda").manual_seed(12)
image_embeds, negative_image_embeds = pipe_prior(prompt, guidance_scale=1.0).to_tuple()
image_embeds, negative_image_embeds = pipe_prior(prompt, generator=generator).to_tuple()
```
```
<Tip warning={true}>
<Tip warning={true}>
...
@@ -78,7 +77,7 @@ of the prior by a factor of 2.
...
@@ -78,7 +77,7 @@ of the prior by a factor of 2.
prompt = "A alien cheeseburger creature eating itself, claymation, cinematic, moody lighting"
prompt = "A alien cheeseburger creature eating itself, claymation, cinematic, moody lighting"
negative_prompt = "low quality, bad quality"
negative_prompt = "low quality, bad quality"
image_embeds, negative_image_embeds = pipe_prior(prompt, negative_prompt, g
enerator=generator
).to_tuple()
image_embeds, negative_image_embeds = pipe_prior(prompt, negative_prompt, g
uidance_scale=1.0
).to_tuple()
```
```
</Tip>
</Tip>
...
@@ -89,7 +88,9 @@ in case you are using a customized negative prompt, that you should pass this on
...
@@ -89,7 +88,9 @@ in case you are using a customized negative prompt, that you should pass this on
with `negative_prompt=negative_prompt`:
with `negative_prompt=negative_prompt`:
```py
```py
image = t2i_pipe(prompt, image_embeds=image_embeds, negative_image_embeds=negative_image_embeds).images[0]
image = t2i_pipe(
prompt, image_embeds=image_embeds, negative_image_embeds=negative_image_embeds, height=768, width=768
).images[0]
image.save("cheeseburger_monster.png")
image.save("cheeseburger_monster.png")
```
```
...
@@ -160,8 +161,7 @@ pipe.to("cuda")
...
@@ -160,8 +161,7 @@ pipe.to("cuda")
prompt = "A fantasy landscape, Cinematic lighting"
prompt = "A fantasy landscape, Cinematic lighting"
negative_prompt = "low quality, bad quality"
negative_prompt = "low quality, bad quality"
generator = torch.Generator(device="cuda").manual_seed(30)
image_embeds, negative_image_embeds = pipe_prior(prompt, negative_prompt).to_tuple()
image_embeds, negative_image_embeds = pipe_prior(prompt, negative_prompt, generator=generator).to_tuple()
out = pipe(
out = pipe(
prompt,
prompt,
...
...
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