Set discard penultimate default to False

This commit is contained in:
Silver 2025-07-11 21:29:40 +02:00 committed by GitHub
parent 6e15d5659b
commit 4535167350
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -495,7 +495,7 @@ def kl_optimal_scheduler(n: int, sigma_min: float, sigma_max: float) -> torch.Te
sigmas[:-1] = (adj_idxs * math.atan(sigma_min) + (1 - adj_idxs) * math.atan(sigma_max)).tan_()
return sigmas
def power_shift_scheduler(model_sampling, steps, power=2.0, midpoint_shift=1.0, discard_penultimate=True):
def power_shift_scheduler(model_sampling, steps, power=2.0, midpoint_shift=1.0, discard_penultimate=False):
total_timesteps = (len(model_sampling.sigmas) - 1)
x = numpy.linspace(0, 1, steps, endpoint=False)
x = x**midpoint_shift