diff --git a/comfy/k_diffusion/sampling.py b/comfy/k_diffusion/sampling.py index 70273d9d57d..7b54d8c5a5c 100644 --- a/comfy/k_diffusion/sampling.py +++ b/comfy/k_diffusion/sampling.py @@ -1080,7 +1080,6 @@ def post_cfg_function(args): d = to_d(x, sigma_hat, temp[0]) if callback is not None: callback({'x': x, 'i': i, 'sigma': sigmas[i], 'sigma_hat': sigma_hat, 'denoised': denoised}) - dt = sigmas[i + 1] - sigma_hat # Euler method x = denoised + d * sigmas[i + 1] return x @@ -1107,7 +1106,6 @@ def post_cfg_function(args): callback({'x': x, 'i': i, 'sigma': sigmas[i], 'sigma_hat': sigmas[i], 'denoised': denoised}) d = to_d(x, sigmas[i], temp[0]) # Euler method - dt = sigma_down - sigmas[i] x = denoised + d * sigma_down if sigmas[i + 1] > 0: x = x + noise_sampler(sigmas[i], sigmas[i + 1]) * s_noise * sigma_up @@ -1138,7 +1136,6 @@ def post_cfg_function(args): if sigma_down == 0: # Euler method d = to_d(x, sigmas[i], temp[0]) - dt = sigma_down - sigmas[i] x = denoised + d * sigma_down else: # DPM-Solver++(2S) @@ -1186,4 +1183,4 @@ def post_cfg_function(args): denoised_mix = -torch.exp(-h) * uncond_denoised - torch.expm1(-h) * (1 / (2 * r)) * (denoised - old_uncond_denoised) x = denoised + denoised_mix + torch.exp(-h) * x old_uncond_denoised = uncond_denoised - return x \ No newline at end of file + return x