Skip to content

feat: add UniPC scheduler#2937

Closed
keturn wants to merge 1 commit into
mainfrom
feat/unipc-scheduler
Closed

feat: add UniPC scheduler#2937
keturn wants to merge 1 commit into
mainfrom
feat/unipc-scheduler

Conversation

@keturn

@keturn keturn commented Mar 12, 2023

Copy link
Copy Markdown
Contributor

This enables the UniPC scheduler added to diffusers 0.13: https://huggingface.co/docs/diffusers/api/schedulers/unipc

@keturn keturn added the enhancement New feature or request label Mar 12, 2023
@keturn

keturn commented Mar 12, 2023

Copy link
Copy Markdown
Contributor Author

…except it doesn't work. It quickly collapses to zero, within the first few steps.

I also tried running with diffusers main to make sure it wasn't huggingface/diffusers#2595 but that didn't seem to make a difference.

the first hunch that's come to mind is something to do with scale_model_input, since that's one way to drive something to zero, but I don't know yet.

@keturn

keturn commented Mar 13, 2023

Copy link
Copy Markdown
Contributor Author

UniPC does work with the stock diffusers pipeline.

The scale_model_input hunch wasn't it, as this scheduler doesn't scale there.

scheduler.config looks the same, scheduler.timestamps looks the same...

@patrickvonplaten

Copy link
Copy Markdown
Contributor

Hmm weird, the do the following schedulers work:

@keturn

keturn commented Mar 16, 2023

Copy link
Copy Markdown
Contributor Author

Correction: it doesn't collapse to 0, it collapses to NaN. Running at float32 instead of float16 does not prevent it.

As for the other models:

Yep, we've had DPMSolverMultistepScheduler in use for a bit now.

DEIS seems to work more or less fine.

@lstein

lstein commented Mar 24, 2023

Copy link
Copy Markdown
Collaborator

Any progress on this?

@keturn

keturn commented May 12, 2023

Copy link
Copy Markdown
Contributor Author

superseded by #3388.

(in theory. in practice I'm getting 422: Unprocessable Entity errors with that, but that's a story for another bug report.)

@keturn keturn closed this May 12, 2023
@keturn keturn deleted the feat/unipc-scheduler branch May 12, 2023 02:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants