javsezlol1 / Stylez

117 stars 8 forks source link

Feature request: Let us use this in parallel to the built-in style selector (and more) #5

Closed ManOrMonster closed 1 year ago

ManOrMonster commented 1 year ago

I really want to use this, but in its current state it is not a replacement for the built-in styles. I want to use this in addition to the built-in style selector.

Here are my feature requests (with explanations below):

The built-in style selector does not inject styles into the prompt textbox when a style is chosen, but instead injects styles at image generation. Styles still persist even after clearing the prompt input. This extension injects them into the prompt input, so they are removed when clearing the prompt. This is inconvenient for me.

Let users choose when/if to convert the styles.csv to JSON. Simply make it a button. Conversion failed for me at first and I had to uninstall/reinstall/edit the config file to make it actually happen. I assume it was due to my styles.csv being a symlink. However, if this extension works alongside the built-in styles selector, people may choose to never convert their styles.

Having a single styles.csv is very convenient to edit. Having 75 separate JSON files to edit after conversion is... not going to happen. Even if every style converted perfectly, I still have to edit their descriptions because they're all set to "converted from csv". I'd rather use this extension for other stuff, such as saving prompts, and convert my styles at leisure if I eventually want to do that. As it stands now, this extension has taken my styles "hostage" in a way.

In addition, let's say someone uses this extension for a month and then decides to go back. Let's say they added 30 new styles in the meantime. Now they need to get the info from 30 separate JSON files into their styles.csv.

Also, a lot of my styles contain emoji to convey certain information quickly. The converter stripped emoji from the file names and the JSON, even though they're supported for both.

ManOrMonster commented 1 year ago

In the meantime, I've commented out the following lines in stylez.js:

const stylesOld_t2i = gradioApp().getElementById("txt2img_styles_row");
stylesOld_t2i.parentNode.removeChild(stylesOld_t2i);
const stylesOld_i2i = gradioApp().getElementById("img2img_styles_row");
stylesOld_i2i.parentNode.removeChild(stylesOld_i2i);

And changed the emoji in these two lines from the paintbrush used by the built-in styles button to these (also in stylez.js):

t2i_StyleBtn.innerText = `🎴`;
i2i_StyleBtn.innerText = `🎴`;

So far so good.

javsezlol1 commented 1 year ago

okay yea ill consider adding in a option for that

javsezlol1 commented 1 year ago

added