stable-diffusion-webui icon indicating copy to clipboard operation
stable-diffusion-webui copied to clipboard

[Feature Request]: Option to offset prompt editing steps

Open ljleb opened this issue 2 years ago • 2 comments

Is there an existing issue for this?

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

What would your feature do ?

I would like to have an option in the ui that offsets the prompt editing steps by one. At the moment, prompt editing steps are off by one (they start at -1 instead of 0). For example, [a:b:5] starts including b only at the 7th step (so at step 6 if counting from 0) instead of the 6th (so at step 5 if counting from 0).

This makes it hard to understand what my prompts do often, because the indices are off. I'm proposing to create an option for this because the syntax has to be backwards compatible with existing prompts for past generations reproduction. If you have a better idea on how to implement this I'm all ears.

Proposed workflow

  1. Go to settings tab
  2. Go to "Prompt Syntax" subtab, or somewhere appropriate
  3. check the "0 based prompt editing step indices", or some other appropriate label

Additional information

No response

ljleb avatar Jan 27 '23 14:01 ljleb

Another way to implement this would be to start the prompt with something like $indices_offset=0 or something like that. One advantage of this second approach is that you dont have to remember whether an old prompt's editing syntax was offset by 1 or not, as it will be in the png info.

ljleb avatar Jan 27 '23 14:01 ljleb

Another idea would be to add a prompt parameter for this, but it feels inappropriate for such an insignificant option to be stored with png info as a setting and take up primary ui space.

ljleb avatar Jan 27 '23 14:01 ljleb