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
0df83c79
Unverified
Commit
0df83c79
authored
Jan 03, 2023
by
neverix
Committed by
GitHub
Jan 03, 2023
Browse files
Fixes in comments in SD2 D2I (#1903)
parent
4a7e4cec
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_depth2img.py
...s/stable_diffusion/pipeline_stable_diffusion_depth2img.py
+3
-3
No files found.
src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_depth2img.py
View file @
0df83c79
...
@@ -551,7 +551,7 @@ class StableDiffusionDepth2ImgPipeline(DiffusionPipeline):
...
@@ -551,7 +551,7 @@ class StableDiffusionDepth2ImgPipeline(DiffusionPipeline):
prompt
,
device
,
num_images_per_prompt
,
do_classifier_free_guidance
,
negative_prompt
prompt
,
device
,
num_images_per_prompt
,
do_classifier_free_guidance
,
negative_prompt
)
)
# 4. Prep
rocess image
# 4. Prep
are depth mask
depth_mask
=
self
.
prepare_depth_map
(
depth_mask
=
self
.
prepare_depth_map
(
image
,
image
,
depth_map
,
depth_map
,
...
@@ -561,10 +561,10 @@ class StableDiffusionDepth2ImgPipeline(DiffusionPipeline):
...
@@ -561,10 +561,10 @@ class StableDiffusionDepth2ImgPipeline(DiffusionPipeline):
device
,
device
,
)
)
# 5. Prep
are depth mask
# 5. Prep
rocess image
image
=
preprocess
(
image
)
image
=
preprocess
(
image
)
# 6.
s
et timesteps
# 6.
S
et timesteps
self
.
scheduler
.
set_timesteps
(
num_inference_steps
,
device
=
device
)
self
.
scheduler
.
set_timesteps
(
num_inference_steps
,
device
=
device
)
timesteps
,
num_inference_steps
=
self
.
get_timesteps
(
num_inference_steps
,
strength
,
device
)
timesteps
,
num_inference_steps
=
self
.
get_timesteps
(
num_inference_steps
,
strength
,
device
)
latent_timestep
=
timesteps
[:
1
].
repeat
(
batch_size
*
num_images_per_prompt
)
latent_timestep
=
timesteps
[:
1
].
repeat
(
batch_size
*
num_images_per_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