Skip to content

DDIMScheduler does not work unless set_timesteps is used #263

Closed
@samedii

Description

@samedii

Describe the bug

Need to set number of inference steps since "None" is default. Expected to have a default value.

Adding a very simple PR.

Reproduction

    scheduler = DDIMScheduler(
        beta_start=0.00085, beta_end=0.012, beta_schedule="scaled_linear"
    )
    # skipping this step will cause an exception later
    # scheduler.set_timesteps(1000)
    pipeline = StableDiffusionPipeline.from_pretrained(
        model_name,
        scheduler=scheduler,
        use_auth_token=True,
    ).to(device)

Logs

>       prev_timestep = timestep - self.config.num_train_timesteps // self.num_inference_steps
E       TypeError: unsupported operand type(s) for //: 'int' and 'NoneType'

System Info

diffusers v0.2.4
python 3.8.8

Metadata

Metadata

Assignees

No one assigned

    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