Open y4my4my4m opened 3 months ago
there's an existing old script that is not actively maintained (from what I can see) but as far as I can tell it's still works if possible I would prefer to update the old extension current UI practices as opposed to add a new extension that does basically the same thing see https://github.com/Leodotpy/sd-pixel
it does everything yours dose and more accept "remove the background using the first top-left pixel's color"
seriously, why the top left pixel if you really want to do make it configurable
@w-e-w sure, that's doable, should i make a fork of sd-pixel and push an updated version instead or..? A few people have been complaining about not being able to set the palette colors nor the dithering/quantization in sd-pixel, i guess i could add that too.
Also, top-left pixel is a common thing in spritesheets with the pink background. Making it customizable is not an issue though
ahhh
I was working on it
any suggestions before I make a PR to https://github.com/Leodotpy/sd-pixel
for future reference your pixelart
tag is not a valid tag defined in tags.json
that's why the test failed
one pixelscript to rule them all
Also, my bad about the tag, should have caught that.
Also, top-left pixel is a common thing in spritesheets with the pink background. Making it customizable is not an issue though
spritesheets as in basically different animation steps of a pixel art object?
I suppose that's a game industry thing?
@w-e-w yes exactly, these:
force a certain palette (i saw another script was made for that but cant find it right now)
Might have been this one https://github.com/C10udburst/stable-diffusion-webui-scripts/tree/master/pixel_art
spritesheets img
so different frames can have different sizes (width and hight), I guess there is some sort of configuration that needs to go with this image right and because that is a config you can make sure that that pixel is not used for an actual object and ca be use as an transparency color?
@w-e-w yeah exactly, as far as I understand it it's more of a legacy standard so that you do not to have to deal with the alpha channel
in the case of AI, a few models are trained on these kind of pixelart and produces a non-transparent image anyway, so reusing the "pink background" method makes sense
in the case of AI, a few models are trained on these kind of pixelart and produces a non-transparent image anyway, so reusing the "pink background" method makes sense
I feel like transparency could be a standalone extension as it might be useful in general
like there are lots of ways you might want to set transparency for example
if you use auto background remover extensions like rembg
I think they're a couple of extensions that uses rembg
or like what you did to your top left corner or specific color with tolerance
also depends on what you need the output format can be different obviously the modern stuff we likely would just use Alpha Channel but maybe in some cases you would like to instead embed transparency color palette metadata (not sure what it's called) in the specific format if supported
@w-e-w it's not a bad idea the reason why i made this was simply for my particular pixel art making workflow and im doing everything using API calls so a simple call simplified everything
im doing everything using API calls so a simple call simplified everything
wait ... if I my code reading is correct we seem to have neglected support different extra modules in API if we support this then this shouldn't be an issue in the first place....
I was testing with different modes of dithering I'm not sure if I screwed up somewhere because it doesn't seem to make a lot of difference
@w-e-w yes the extra dont work out of the box in the API, ive been hard coding the changes for my server lol
Post some code for the dithering/result i can check with you
Info
https://github.com/y4my4my4m/y4my4m-pixelizer
This is a very simple script that simply shrinks the image down using neareset neighbour by the set pixel amount, with the option to scale it back up. As well as the option to remove the background using the first top-left pixel's color.
Before:
After:
Checklist:
Readme.md
index.json
andextension_template.json
have not been modified.entry
is placed in theextensions
directory with the.json
file extension.