Skip to content

off-by-one error in pndm scheduler #477

Description

@rokbok

There appears to be an off-by-one error on this line:

alpha_prod_t = self.alphas_cumprod[timestep + 1 - self._offset]

I got IndexError: index 1000 is out of bounds for dimension 0 with size 1000

Repro script:

from diffusers import StableDiffusionPipeline, StableDiffusionImg2ImgPipeline
from PIL import Image

pipe = StableDiffusionPipeline.from_pretrained(
    "CompVis/stable-diffusion-v1-4", 
    torch_dtype = torch.float16,
    revision = 'fp16',
    use_auth_token = True,
).to("cuda")

with torch.autocast("cuda"):
        image = pipe(prompt="astronaut or doesn't really matter", num_inference_steps=3)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions