mirror of
https://github.com/huggingface/diffusers.git
synced 2026-01-27 17:22:53 +03:00
no inference moed doesn't always work
This commit is contained in:
@@ -161,7 +161,7 @@ for t in tqdm.tqdm(reversed(range(num_inference_steps)), total=num_inference_ste
|
||||
# 1. predict noise residual
|
||||
orig_t = len(noise_scheduler) // num_inference_steps * t
|
||||
|
||||
with torch.inference_mode():
|
||||
with torch.no_grad():
|
||||
residual = unet(image, orig_t)
|
||||
|
||||
# 2. predict previous mean of image x_t-1
|
||||
|
||||
Reference in New Issue
Block a user