Skip to content

Bug for DPMSolverMultistepScheduler #5981

Closed
@JinGuang-cuhksz

Description

@JinGuang-cuhksz

Describe the bug

AttributeError: 'DPMSolverMultistepScheduler' object has no attribute 'sigmas'.

from diffusers import DPMSolverMultistepScheduler
import torch

scheduler = DPMSolverMultistepScheduler()
x = torch.ones(10, 2)
t = torch.tensor([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]).long()
noise = torch.randn_like(x)
print(scheduler.add_noise(x, noise, t))

The above code can work for version 0.21.4, but doesn't work for version 0.23.1. The following is the error:

/root/miniconda3/envs/env/bin/python test.py
Traceback (most recent call last):
File "/test.py", line 8, in
print(scheduler.add_noise(x, noise, t))
File "/root/miniconda3/envs/env/lib/python3.10/site-packages/diffusers/schedulers/scheduling_dpmsolver_multistep.py", line 879, in add_noise
sigmas = self.sigmas.to(device=original_samples.device, dtype=original_samples.dtype)
File "/root/miniconda3/envs/env/lib/python3.10/site-packages/diffusers/configuration_utils.py", line 137, in getattr
raise AttributeError(f"'{type(self).name}' object has no attribute '{name}'")
AttributeError: 'DPMSolverMultistepScheduler' object has no attribute 'sigmas'. Did you mean: 'sigma_t'?

Reproduction

from diffusers import DPMSolverMultistepScheduler
import torch

scheduler = DPMSolverMultistepScheduler()
x = torch.ones(10, 2)
t = torch.tensor([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]).long()
noise = torch.randn_like(x)
print(scheduler.add_noise(x, noise, t))

Logs

No response

System Info

Diffusers 0.23.1; torch 1.12.1+cu113

Who can help?

@yiyixuxu @patrickvonplaten

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions