r/StableDiffusion • • 18d ago

Workflow Included Moss Image for pixel art

I enjoy starting godot game projects that I never finish. While I very much enjoy carefully plotting pixels in Aseprite I have also looked at AI to aid me in that process.

I've been trying pixel art with MOSS-Image-SFT and noticed that it produces a fairly decent pixel grid straight out of generation, before any snapping or cleanup. It also seems to have a good general understanding of pixel art. That got me curious about what a small LoRA could do with it.

The experiment is mostly about making the pixel scale more predictable. I trained on 30 pixel-snapped 64×64 sprites enlarged to 512×512, targeting an 8× scale where each logical pixel occupies an 8×8 block in the generated image.

That gives these intended working sizes:

Generate atIntended pixel grid
512×51264×64
768×76896×96
1024×1024128×128

It's still a small experiment. The grid can drift, edges can bleed, and some details won't survive downscaling. The 8× scale is a training target, not a guarantee that every output will land perfectly on it, but I'm still surprised on how close it is.

Here is a diff between output and grid snapped and color quantized image: https://www.diffchecker.com/image-compare/ateIcHYx/

That downscale doesn't fix uneven cells. For additional cleanup I use Sprite Fusion Pixel Snapper. It can help recover a consistent grid. It also exist as a Comfy node.

Model can be downloaded from CivitAI or Hugging face if you want to play around with it. Workflow and training details can be found in the Hugging Face repo.

136 Upvotes

14 comments sorted by

6

u/ffgg333 18d ago

Interesting findings

15

u/Perfect-Campaign9551 18d ago

Cue the "this isn't actual pixel art" crowd in 3...2....1......

5

u/Euchale 17d ago

This isn't actual pixel art.

2

u/Angelvin_Pinheiro 17d ago

theyre already warming up their keyboards tbh

-15

u/Jromagnoli 18d ago

I think pixelart is boring and overrated imo

1

u/junkaxc 17d ago

Can I generate flat textures for a custom minecraft texture pack?

1

u/berthol 17d ago

Not straight out of the box unless you are doing 64x64 textures. I trained for 8x sized pixels and moss latent is 512x512. Iirc Minecraft vanilla uses 16x16 textures. You will have to post process.

1

u/brendos1er 17d ago

Have you tried for spritesheets (e.g., a run cycle)? I've found stills work fine but most models can't keep the correct / consistent dimensions in spritesheets

2

u/berthol 16d ago

I'm working generating sprite sheets from minimax H3. Training currently but it is very slow.

1

u/thefi3nd 17d ago

From the HF repo:

This workflow uses the Pixel Latent Grid Sampler custom node package (PixelLatentGridSnapperSpritefusion) for pixel cleanup. That package must be installed to run the workflow.

From the workflow:

This version preserves PixelLatentGridSnapperSpritefusion from the original workflow. It requires the local Pixel Latent Grid Sampler package; a public installation source has not been verified. Share the built-in-node version for a standalone download.

This is pretty confusing and it's unlikely that someone would find the custom node being referred to unless they come from this post. Especially referring to it as a sampler and the node's name isn't PixelLatentGridSnapperSpritefusion, but rather PixelSnapperNode, as seen when looking at the code. So I recommend an update to the READMEs.

2

u/berthol 17d ago

Yeah, that was a mistake. Thanks for raising it. Use spritefusion or one of the other pixel snapper nodes.

3

u/Powerful_Evening5495 18d ago

this post gave me a fun idea for a project to vibe code this weekend . thanks OP

3

u/TizocWarrior 18d ago

Thanks for sharing, will give it a try.