Skip to content

[Bug]: Alternating Words works incorrectly with samplers that sample multiple times per step #6870

@Glen-O

Description

@Glen-O

Is there an existing issue for this?

  • I have searched the existing issues and checked the recent builds/commits

What happened?

When you run a txt2img (likely also happens with other modes), if you use alternating words (such as [Mario|Luigi]) and choose a sampling method that samples multiple times per sampling step, such as Heun or DPM++ SDE Karras, the alternating will be applied per sample, rather than per step... and then the alternating will stop once it has sampled as many times as the "Sampling steps" number. So if the sampling method samples twice per step, it will stop alternating after half the steps.

Steps to reproduce the problem

  1. Go to txt2img
  2. Put in a prompt with an alternating words, such as [Mario|Luigi]
  3. Choose a Sampling method such as Heun or DPM++ SDE Karras - one that samples twice per step
  4. Make sure you have it set to display the result after every step.
  5. Watch as the alternating stops at 50%, and the final image is strongly the first entry in the alternating set (in this case, "Mario").

What should have happened?

Alternating should continue until complete - possibly, the alternation should be based on step number, rather than how many times the sample is taken.

Commit where the problem happens

dac59b9

What platforms do you use to access UI ?

Linux

What browsers do you use to access the UI ?

Mozilla Firefox

Command Line Arguments

No response

Additional information, context and logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug-reportReport of a bug, yet to be confirmed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions