- 
                Notifications
    You must be signed in to change notification settings 
- Fork 6.5k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
This is a continuation of issue #10266 with related pr #10267 which provided a fix for some, but not all schedulers
specifically, it fixed DPMSolverMultistepInverseScheduler, but NOT DPMSolverMultistepScheduler
Reproduction
sampler configurations that produce error:
class=DPMSolverMultistepScheduler config={'num_train_timesteps': 1000, 'beta_start': 0.00085, 'beta_end': 0.012, 'beta_schedule': 'squaredcos_cap_v2', 'solver_order': 2, 'prediction_type': 'epsilon', 'dynamic_thresholding_ratio': 0.995, 'sample_max_value': 1.0, 'algorithm_type': 'dpmsolver++', 'solver_type': 'midpoint', 'lower_order_final': True, 'use_lu_lambdas': True, 'flow_shift': 1.0, 'final_sigmas_type': 'zero', 'lambda_min_clipped': -inf, 'timestep_spacing': 'linspace', 'steps_offset': 0}
class=DPMSolverMultistepScheduler config={'num_train_timesteps': 1000, 'beta_start': 0.00085, 'beta_end': 0.012, 'beta_schedule': 'squaredcos_cap_v2', 'solver_order': 2, 'prediction_type': 'epsilon', 'dynamic_thresholding_ratio': 0.995, 'sample_max_value': 1.0, 'algorithm_type': 'dpmsolver++', 'solver_type': 'midpoint', 'lower_order_final': True, 'use_karras_sigmas': True, 'flow_shift': 1.0, 'final_sigmas_type': 'zero', 'lambda_min_clipped': -inf, 'timestep_spacing': 'linspace', 'steps_offset': 0}
or shorter, out of all combinations problematic are:
beta_schedule=squaredcos_cap_v2 combined with either use_lu_lambdas or use_karras_sigmas
Logs
β /home/vlado/dev/sdnext/venv/lib/python3.12/site-packages/diffusers/pipelines/stable_diffusion_xl/pipeline_stable_diffusion_xl.py:1237 in __call__                                                                                                                                                                                                                                                                                β
β                                                                                                                                                                                                                                                                                                                                                                                                                                  β
β   1236 β   β   β   β   latents_dtype = latents.dtype                                                                                                                                                                                                                                                                                                                                                                             β
β β± 1237 β   β   β   β   latents = self.scheduler.step(noise_pred, t, latents, **extra_step_kwargs, return_dict=False)[0]                                                                                                                                                                                                                                                                                                          β
β   1238 β   β   β   β   if latents.dtype != latents_dtype:                                                                                                                                                                                                                                                                                                                                                                        β
β                                                                                                                                                                                                                                                                                                                                                                                                                                  β
β /home/vlado/dev/sdnext/venv/lib/python3.12/site-packages/diffusers/schedulers/scheduling_dpmsolver_multistep.py:1102 in step                                                                                                                                                                                                                                                                                                     β
β                                                                                                                                                                                                                                                                                                                                                                                                                                  β
β   1101 β   β   elif self.config.solver_order == 2 or self.lower_order_nums < 2 or lower_order_second:                                                                                                                                                                                                                                                                                                                            β
β β± 1102 β   β   β   prev_sample = self.multistep_dpm_solver_second_order_update(self.model_outputs, sample=sample, noise=noise)                                                                                                                                                                                                                                                                                                   β
β   1103 β   β   else:                                                                                                                                                                                                                                                                                                                                                                                                             β
β                                                                                                                                                                                                                                                                                                                                                                                                                                  β
β /home/vlado/dev/sdnext/venv/lib/python3.12/site-packages/diffusers/schedulers/scheduling_dpmsolver_multistep.py:825 in multistep_dpm_solver_second_order_update                                                                                                                                                                                                                                                                  β
β                                                                                                                                                                                                                                                                                                                                                                                                                                  β
β    824 β   β   sigma_t, sigma_s0, sigma_s1 = (                                                                                                                                                                                                                                                                                                                                                                                   β
β β±  825 β   β   β   self.sigmas[self.step_index + 1],                                                                                                                                                                                                                                                                                                                                                                             β
β    826 β   β   β   self.sigmas[self.step_index],                                                                                                                                                                                                                                                                                                                                                                                 β
β°βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ―
IndexError: index 21 is out of bounds for dimension 0 with size 21System Info
diffusers==0.33.0-dev
Who can help?
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working