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
21543de5
Unverified
Commit
21543de5
authored
Jun 27, 2025
by
Sayak Paul
Committed by
GitHub
Jun 27, 2025
Browse files
remove syncs before denoising in Kontext (#11818)
parent
d7dd924e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
src/diffusers/pipelines/flux/pipeline_flux.py
src/diffusers/pipelines/flux/pipeline_flux.py
+2
-0
src/diffusers/pipelines/flux/pipeline_flux_kontext.py
src/diffusers/pipelines/flux/pipeline_flux_kontext.py
+3
-0
No files found.
src/diffusers/pipelines/flux/pipeline_flux.py
View file @
21543de5
...
@@ -898,6 +898,8 @@ class FluxPipeline(
...
@@ -898,6 +898,8 @@ class FluxPipeline(
)
)
# 6. Denoising loop
# 6. Denoising loop
# We set the index here to remove DtoH sync, helpful especially during compilation.
# Check out more details here: https://github.com/huggingface/diffusers/pull/11696
self
.
scheduler
.
set_begin_index
(
0
)
self
.
scheduler
.
set_begin_index
(
0
)
with
self
.
progress_bar
(
total
=
num_inference_steps
)
as
progress_bar
:
with
self
.
progress_bar
(
total
=
num_inference_steps
)
as
progress_bar
:
for
i
,
t
in
enumerate
(
timesteps
):
for
i
,
t
in
enumerate
(
timesteps
):
...
...
src/diffusers/pipelines/flux/pipeline_flux_kontext.py
View file @
21543de5
...
@@ -1043,6 +1043,9 @@ class FluxKontextPipeline(
...
@@ -1043,6 +1043,9 @@ class FluxKontextPipeline(
)
)
# 6. Denoising loop
# 6. Denoising loop
# We set the index here to remove DtoH sync, helpful especially during compilation.
# Check out more details here: https://github.com/huggingface/diffusers/pull/11696
self
.
scheduler
.
set_begin_index
(
0
)
with
self
.
progress_bar
(
total
=
num_inference_steps
)
as
progress_bar
:
with
self
.
progress_bar
(
total
=
num_inference_steps
)
as
progress_bar
:
for
i
,
t
in
enumerate
(
timesteps
):
for
i
,
t
in
enumerate
(
timesteps
):
if
self
.
interrupt
:
if
self
.
interrupt
:
...
...
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