Unverified Commit 21543de5 authored by Sayak Paul's avatar Sayak Paul Committed by GitHub
Browse files

remove syncs before denoising in Kontext (#11818)

parent d7dd924e
...@@ -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):
......
...@@ -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:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment