Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Sampling error with V-Prediction model #571

Open
yamatazen opened this issue Nov 17, 2024 · 2 comments
Open

[Bug]: Sampling error with V-Prediction model #571

yamatazen opened this issue Nov 17, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@yamatazen
Copy link

What happened?

Sampling didn't work with V-Prediction model.

What did you expect would happen?

Successful image generation.

Relevant log output

Traceback (most recent call last):                                                              | 0/70 [00:00<?, ?it/s]
  File "C:\Users\yamat\Desktop\OneTrainer\modules\trainer\GenericTrainer.py", line 254, in __sample_loop:01,  1.05s/it]
    self.model_sampler.sample(
  File "C:\Users\yamat\Desktop\OneTrainer\modules\modelSampler\StableDiffusionXLSampler.py", line 471, in sample
    image = self.__sample_base(
  File "C:\Users\yamat\Desktop\OneTrainer\venv\lib\site-packages\torch\utils\_contextlib.py", line 116, in decorate_context
    return func(*args, **kwargs)
  File "C:\Users\yamat\Desktop\OneTrainer\modules\modelSampler\StableDiffusionXLSampler.py", line 171, in __sample_base
    latent_image = noise_scheduler.step(
  File "C:\Users\yamat\Desktop\OneTrainer\venv\src\diffusers\src\diffusers\schedulers\scheduling_euler_discrete.py", line 668, in step
    dt = self.sigmas[self.step_index + 1] - sigma_hat
IndexError: index 21 is out of bounds for dimension 0 with size 21
Error during sampling, proceeding without sampling

Output of pip freeze

No response

@yamatazen yamatazen added the bug Something isn't working label Nov 17, 2024
@O-J1
Copy link
Collaborator

O-J1 commented Nov 17, 2024

What happened?

Sampling didn't work with V-Prediction model.

What did you expect would happen?

Successful image generation.

Relevant log output

Traceback (most recent call last):                                                              | 0/70 [00:00<?, ?it/s]
  File "C:\Users\yamat\Desktop\OneTrainer\modules\trainer\GenericTrainer.py", line 254, in __sample_loop:01,  1.05s/it]
    self.model_sampler.sample(
  File "C:\Users\yamat\Desktop\OneTrainer\modules\modelSampler\StableDiffusionXLSampler.py", line 471, in sample
    image = self.__sample_base(
  File "C:\Users\yamat\Desktop\OneTrainer\venv\lib\site-packages\torch\utils\_contextlib.py", line 116, in decorate_context
    return func(*args, **kwargs)
  File "C:\Users\yamat\Desktop\OneTrainer\modules\modelSampler\StableDiffusionXLSampler.py", line 171, in __sample_base
    latent_image = noise_scheduler.step(
  File "C:\Users\yamat\Desktop\OneTrainer\venv\src\diffusers\src\diffusers\schedulers\scheduling_euler_discrete.py", line 668, in step
    dt = self.sigmas[self.step_index + 1] - sigma_hat
IndexError: index 21 is out of bounds for dimension 0 with size 21
Error during sampling, proceeding without sampling

Output of pip freeze

No response

Please include your config.json export and your pip freeze.

@Nerogar
Copy link
Owner

Nerogar commented Nov 17, 2024

Looks like the same issue as #468

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants