Skip to content

[Bug] AttributeError: 'EditDDIMScheduler' object has no attribute 'sample_timestep' #2140

@BEARSXXX

Description

@BEARSXXX

Prerequisite

Task

I'm using the official example scripts/configs for the officially supported tasks/models/datasets.

Branch

main branch https://github.com/open-mmlab/mmagic

Environment

11

Reproduces the problem - code sample

1

Reproduces the problem - command or script

1

Reproduces the problem - error message

  File "D:\Anaconda\envs\mmagic\lib\site-packages\mmengine\runner\loops.py", line 309, in run_iter
    outputs = self.runner.model.train_step(
  File "D:\mmagic-main\mmagic-main\mmagic\models\editors\guided_diffusion\adm.py", line 289, in train_step
    timestep = self.diffusion_scheduler.sample_timestep()
AttributeError: 'EditDDIMScheduler' object has no attribute 'sample_timestep'

Additional information

是不是下面的代码没写全?

    def training_loss(self, model, x_0, t):
        raise NotImplementedError(
            'This function is supposed to return '
            'a dict containing loss items giving sampled x0 and timestep.')

    def sample_timestep(self):
        raise NotImplementedError

Metadata

Metadata

Assignees

Labels

kind/bugsomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions