Add block swap in sample image timestep loop

This commit is contained in:
rockerBOO
2025-02-28 14:11:53 -05:00
parent d6f7e2e20c
commit 1bba7acd9a

View File

@@ -647,6 +647,7 @@ def denoise(
"""
for i, t in enumerate(tqdm(timesteps)):
model.prepare_block_swap_before_forward()
# reverse the timestep since Lumina uses t=0 as the noise and t=1 as the image
current_timestep = 1 - t / scheduler.config.num_train_timesteps