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

Fix "Send seed/size to other tab" options

Open space-nuko opened this issue 2 years ago • 0 comments

Describe what this pull request is trying to achieve.

I found out that the "Send size/seed to other tab" options were not being respected when sending from txt2img to img2img. Turns out that the paste function was ignoring the image data in the gallery, but not the infotext parameters. To remedy this I made two changes:

  1. Check the tabname when parsing the infotext, and remove seed/size if sending from another tab unless the tab was pnginfo
  2. Update the on_infotext_pasted script callback to include the source and destination tabname in the params, setting up for a potential extension that greatly improves the filter on what gets passed between tabs (like disabling sending width/height, but only if the destination tab is img2img)

Additional notes and description of your changes

N/A

Environment this was tested in

List the environment you have developed / tested this on. As per the contributing page, changes should be able to work on Windows out of the box.

  • OS: Windows
  • Browser: Chrome
  • Graphics card: NVIDIA RTX 3090

Screenshots or videos of your changes

N/A

space-nuko avatar Feb 17 '23 05:02 space-nuko