r/comfyui • • 8d ago

Help Needed Pixel Art sheet upscale

I have a bunch of pixel art sprite sheets that I want to upscale and, where needed, remove the background from. The important part is that nothing about the art itself changes. Same pixels, same colours, just bigger.

Can someone point me in the right direction?

4 Upvotes

11 comments sorted by

3

u/zyg_AI 8d ago

Nearest-exact should give the more faithful output.
If the edges are too sharp, try area.

And also, while you're at it, try the other 3, who knows, maybe you'll fancy the results more.

1

u/Swordum 8d ago

So I would have the image, linked to Upscale Image, upscale image linked to save file?

2

u/Aaron_rowe81 8d ago

yep: Load Image -> Upscale Image -> Save Image. Set width and height to exact multiples of the original, with nearest-exact selected, so each pixel scales cleanly

1

u/Swordum 8d ago

What about the mask? The background needs to be transparent. I’ve managed to upscale it, but I can’t make the transparency work…

2

u/Aaron_rowe81 7d ago

the mask needs its own path: convert it to an image, upscale with nearest-exact, then convert it back and feed it into Join Image With Alpha alongside the upscaled art. Save that RGBA result.

1

u/Swordum 7d ago

Thanks a lot! It’s a bit overwhelming all this nodes system at first

1

u/Aaron_rowe81 7d ago

save the workflow once it works, then you can reuse it for the other sheets without rebuilding all those nodes

2

u/zyg_AI 8d ago edited 8d ago

Spot on 👍 - Use 'preview image' first. Save image when you're happy with the result. Or save them all and sort later.

This node takes width and height as input
There are other nodes which upscale by a factor or to a total number of pixels. Double click the canvas and type 'upscale'. Pick what you prefer.

1

u/Much_Wasabi2390 8d ago

yeah nearest-exact is definitely the way to go if you want to keep the hard pixel edges intact

1

u/roxoholic 7d ago

You should use Upscale Image By with nearest-exact and integer scale (2, 3, 4, etc.).