Gerschel / sd_web_ui_preset_utils

Preset Manager moved private
252 stars 20 forks source link

Preset save does not automatically populate dropdown in other tab #15

Closed Gerschel closed 1 year ago

Gerschel commented 1 year ago

Reference: https://github.com/Gerschel/sd_web_ui_preset_utils/issues/12

Gerschel commented 1 year ago

This means that in order for the other tab to see the preset, I would either need to:

seek for the dropdown for the other component through parent child tree 👎 add an automatic refresh to both dropdowns; potential ways

  • 👍 tab change
  • 👌 automatic refresh on dropdown change
  • 👌 targeting elem id (likely scenario; dependent on if after_components() method can hand-off components from scripts that initialize afterwards; affects if txt2img can see img2img through component mapping; can use js if necessary)
  • refresh button 👎
  • ⚠️ give up and go with the next iteration of having different presets per tab
Gerschel commented 1 year ago

Used class variables to pass information between txt2img and img2img.
Used a conditional in txt2img to instantiate both once Used conditional to render independently in each tab.