@@ -1080,7 +1080,6 @@ def post_cfg_function(args):
10801080 d = to_d (x , sigma_hat , temp [0 ])
10811081 if callback is not None :
10821082 callback ({'x' : x , 'i' : i , 'sigma' : sigmas [i ], 'sigma_hat' : sigma_hat , 'denoised' : denoised })
1083- dt = sigmas [i + 1 ] - sigma_hat
10841083 # Euler method
10851084 x = denoised + d * sigmas [i + 1 ]
10861085 return x
@@ -1107,7 +1106,6 @@ def post_cfg_function(args):
11071106 callback ({'x' : x , 'i' : i , 'sigma' : sigmas [i ], 'sigma_hat' : sigmas [i ], 'denoised' : denoised })
11081107 d = to_d (x , sigmas [i ], temp [0 ])
11091108 # Euler method
1110- dt = sigma_down - sigmas [i ]
11111109 x = denoised + d * sigma_down
11121110 if sigmas [i + 1 ] > 0 :
11131111 x = x + noise_sampler (sigmas [i ], sigmas [i + 1 ]) * s_noise * sigma_up
@@ -1138,7 +1136,6 @@ def post_cfg_function(args):
11381136 if sigma_down == 0 :
11391137 # Euler method
11401138 d = to_d (x , sigmas [i ], temp [0 ])
1141- dt = sigma_down - sigmas [i ]
11421139 x = denoised + d * sigma_down
11431140 else :
11441141 # DPM-Solver++(2S)
@@ -1186,4 +1183,4 @@ def post_cfg_function(args):
11861183 denoised_mix = - torch .exp (- h ) * uncond_denoised - torch .expm1 (- h ) * (1 / (2 * r )) * (denoised - old_uncond_denoised )
11871184 x = denoised + denoised_mix + torch .exp (- h ) * x
11881185 old_uncond_denoised = uncond_denoised
1189- return x
1186+ return x
0 commit comments