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]: Error with starter model dreamshaper 8 and certain schedulers #6368

Open
1 task done
psychedelicious opened this issue May 14, 2024 · 1 comment
Open
1 task done
Labels
bug Something isn't working

Comments

@psychedelicious
Copy link
Collaborator

psychedelicious commented May 14, 2024

Is there an existing issue for this problem?

  • I have searched the existing issues

Operating system

Linux

GPU vendor

Nvidia (CUDA)

GPU model

No response

GPU VRAM

24

Version number

4.2.1

Browser

FF

Python dependencies

No response

What happened

When using the starter model dreamshaper 8 (or dreamshaper 8 inpainting) and some schedulers, generation fails during denoising.

Only these schedulers trigger the error:

  • DPM++ 2M
  • DPM++ 2M Karras
  • DPM++ 2S
  • DPM++ 2S Karras
[2024-05-15 08:41:36,681]::[InvokeAI]::ERROR --> Error while invoking session 7c0fe7a9-5eab-454e-877c-98802fec7854, invocation 08dbe0a3-30d8-4da7-a510-a5ac52264c8e (denoise_latents):
`final_sigmas_type` zero is not supported for `algorithm_type` deis. Please choose `sigma_min` instead.
[2024-05-15 08:41:36,681]::[InvokeAI]::ERROR --> Traceback (most recent call last):
  File "/home/bat/Documents/Code/InvokeAI/invokeai/app/services/session_processor/session_processor_default.py", line 185, in _process
    outputs = self._invocation.invoke_internal(
  File "/home/bat/Documents/Code/InvokeAI/invokeai/app/invocations/baseinvocation.py", line 281, in invoke_internal
    output = self.invoke(context)
  File "/home/bat/Documents/Code/InvokeAI/.venv/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "/home/bat/Documents/Code/InvokeAI/invokeai/app/invocations/latent.py", line 948, in invoke
    scheduler = get_scheduler(
  File "/home/bat/Documents/Code/InvokeAI/invokeai/app/invocations/latent.py", line 313, in get_scheduler
    scheduler = scheduler_class.from_config(scheduler_config)
  File "/home/bat/Documents/Code/InvokeAI/.venv/lib/python3.10/site-packages/diffusers/configuration_utils.py", line 259, in from_config
    model = cls(**init_dict)
  File "/home/bat/Documents/Code/InvokeAI/.venv/lib/python3.10/site-packages/diffusers/configuration_utils.py", line 653, in inner_init
    init(self, *args, **init_kwargs)
  File "/home/bat/Documents/Code/InvokeAI/.venv/lib/python3.10/site-packages/diffusers/schedulers/scheduling_dpmsolver_multistep.py", line 268, in __init__
    raise ValueError(
ValueError: `final_sigmas_type` zero is not supported for `algorithm_type` deis. Please choose `sigma_min` instead.

The starter models tab installs a diffusers version of the affected models. When using the checkpoint version of this model, there is no error.

What you expected to happen

All the schedulers work.

How to reproduce the problem

No response

Additional context

No response

Discord username

No response

@psychedelicious psychedelicious added the bug Something isn't working label May 14, 2024
@Vargol
Copy link
Contributor

Vargol commented May 22, 2024

I'd guess it's picking up algorithm-type 'deis' from the default scheduler for the model which is DEISMultistepScheduler, and using that in the scheduler config for the DPM schedulers.
DEISMultistepScheduler however doesn't have a final_sigmas_type parameter so it's using the default 'zero' value for final_sigmas_type from the DPM schedulers which is not compatible with the deis algorithm type.

It's probably going to need a check for this in the code which picks other f the values to change (algorithm type would seem most sensible to me, so DPM using its default value) unless the InvokeAI team give us a way of changing the scheduler parameters.

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

2 participants