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

Add kwargs argument to process_tokens()

Open tateisu opened this issue 3 years ago • 3 comments

sd_hijack.py / process_tokens()

  • add kwargs argument.
  • caller set text argument to process_tokens()

The extension implementation will be able to use text to determine something.

Breaking change

  • if there is some extension hooks process_tokens and it does not expect extra arguments, it will need update.
  • for aesthetic-gradients , I wrote PR. https://github.com/AUTOMATIC1111/stable-diffusion-webui-aesthetic-gradients/pull/2

tateisu avatar Oct 23 '22 04:10 tateisu

process tokens does not even work with the whole text

please don't add stuff just to add stuff

AUTOMATIC1111 avatar Oct 23 '22 06:10 AUTOMATIC1111

The real problem I have is https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/3398 . But the current structure cannot solve that.

tateisu avatar Oct 23 '22 11:10 tateisu

Original PR with aesthetic gradients also applied its effects to negative prompt, so that must have been the original intention. In any case your change definitely does not solve the problem.

AUTOMATIC1111 avatar Oct 24 '22 06:10 AUTOMATIC1111