Skip to content

Fix prompt schedule for second order samplers #9669

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

Merged

Conversation

catboxanon
Copy link
Collaborator

@catboxanon catboxanon commented Apr 17, 2023

Describe what this pull request is trying to achieve.

Closes #7508

Second order samplers (Heun, DPM2/a, DPM++ 2S/a, DPM++ SDE / Karras) cause the prompt schedule to run twice as fast when prompting something like [dog:cat:0.5] (i.e. for 100 steps, prompt is dog until step 25, cat until 50, and remains dog until 100). This fixes that by checking if the sampler is any of these second order samplers and multiplies the step count by 2 for calculating the prompt schedule.

Additional notes and description of your changes

I've also added a compatibility option to replicate old seeds, as it's otherwise impossible to replicate them since the prompt would always run as twice as fast.

Environment this was tested in

  • OS: Windows 11
  • Browser: Firefox
  • Graphics card: NVIDIA RTX 3090

@AUTOMATIC1111 AUTOMATIC1111 changed the base branch from master to dev April 29, 2023 09:56
@AUTOMATIC1111 AUTOMATIC1111 merged commit d6a3988 into AUTOMATIC1111:dev Apr 29, 2023
@catboxanon catboxanon deleted the patch/sampler-schedule-fix branch March 4, 2024 23:27
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.

[Bug]: Prompt editing schedule behaving strangely in certain samplers
2 participants