Commit e47c97a4 authored by Patrick von Platen's avatar Patrick von Platen
Browse files

no inference moed doesn't always work

parent 740326d2
...@@ -161,7 +161,7 @@ for t in tqdm.tqdm(reversed(range(num_inference_steps)), total=num_inference_ste ...@@ -161,7 +161,7 @@ for t in tqdm.tqdm(reversed(range(num_inference_steps)), total=num_inference_ste
# 1. predict noise residual # 1. predict noise residual
orig_t = len(noise_scheduler) // num_inference_steps * t orig_t = len(noise_scheduler) // num_inference_steps * t
with torch.inference_mode(): with torch.no_grad():
residual = unet(image, orig_t) residual = unet(image, orig_t)
# 2. predict previous mean of image x_t-1 # 2. predict previous mean of image x_t-1
......
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