Skip to content

Conversation

@patil-suraj
Copy link
Contributor

This PR adds v-prediction support to PNDMScheduler, LMSDiscreteScheduler and EulerAncestralDiscreteScheduler.

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Dec 1, 2022

The documentation is not available anymore as the PR was closed or merged.

@patil-suraj patil-suraj marked this pull request as draft December 1, 2022 14:09
Copy link
Contributor

@patrickvonplaten patrickvonplaten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we use this PR to also add tests to all the schedulers?

@patil-suraj patil-suraj marked this pull request as ready for review December 1, 2022 14:43
@natolambert
Copy link
Contributor

The simple test I had from the original v-prediction pr

def test_prediction_type(self):
        for prediction_type in ["epsilon", "sample", "velocity"]:
            self.check_over_configs(prediction_type=prediction_type)

I can add ddpm to this or in another pr if it's not done yet.

@natolambert
Copy link
Contributor

Or just copy the code from #818 for ddpm

Copy link
Contributor

@patrickvonplaten patrickvonplaten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@patrickvonplaten patrickvonplaten merged commit b85bb07 into main Dec 1, 2022
@patrickvonplaten patrickvonplaten deleted the more-v-scheds branch December 1, 2022 17:10
tcapelle pushed a commit to tcapelle/diffusers that referenced this pull request Dec 12, 2022
* support v prediction in other schedulers

* v heun

* add tests for v pred

* fix tests

* fix test euler a

* v ddpm
sliard pushed a commit to sliard/diffusers that referenced this pull request Dec 21, 2022
* support v prediction in other schedulers

* v heun

* add tests for v pred

* fix tests

* fix test euler a

* v ddpm
@alexisrolland
Copy link
Contributor

alexisrolland commented Jan 9, 2023

Hi, is there a documentation somewhere describing what it is / how to use v-prediction with the schedulers? Or is this automatically used?

@patil-suraj
Copy link
Contributor Author

It's automatically used based on the value in the scheduler_config file, cf https://huggingface.co/stabilityai/stable-diffusion-2-1/blob/main/scheduler/scheduler_config.json#L9

You can also pass prediction_type="v_prediction when instantiating/loading the scheduler.

yoonseokjin pushed a commit to yoonseokjin/diffusers that referenced this pull request Dec 25, 2023
* support v prediction in other schedulers

* v heun

* add tests for v pred

* fix tests

* fix test euler a

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants