Code Monkey home page Code Monkey logo

Comments (1)

Gerschel avatar Gerschel commented on August 10, 2024

A preffered fix would still include a preset to be used across tabs rather than isolating them.
So I would need to create a filter that checks if value is in current options of dropdown, and if it does not
exist, then pass in default value component would have during load time.

To express this:
if loadingvalue not in component.choices then use component.value (value is default value)

There will remain an issue where saving in one tab does not populate it in the other unless a restart occurs.
This is because the application loads the script twice. Once for txt2img and again for img2img.
You may have noticed that sometimes errors show up twice, or print/echo to console repeats.

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

from sd_web_ui_preset_utils.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.