Pixelate

Details

Download Files

Model description

Pixelate was done using Pyodide since i prefer writing code in Python, but an improved version is available here: /model/2003107?modelVersionId=2267300

Thanks LizArt9 for taking the time to rewrite it in pure JS!

V1.5

Added more options to select quantization method, kmeans and dithering and a slightly better interface using simpleCSS (plus, no more need to change the wheel url if it is hosted next to it)

V1

Since not everyone has access to either A1111/Forge or even Python and that compiling Pillow with libimagequant is a pain in the ass, here is a tool to apply the pixel method described in my previous article... directly in your browser!

Leveraging Pyodide, a python interpreter in WASM and a custom build Pillow wheel with libimagequant, you can directly pixelate any picture simply.

The tool is available directly as a static space in HF: https://huggingface.co/spaces/n-Arno/pixelate

If you want to modify and host it yourself, you can download the source as a zip file here but please note that you'll have to host it somewhere (both the html and whl files) and change "https://" in the code to your correct url like "https://test.com/page"

How to use:

  1. browse for a picture

  2. click run (it may take a few seconds at start in order to init Pyodide)

  3. click reload original before re-running if you want to change the options (or they will be applied to the current image, may be helpful to reduce step by step).

Options:

  1. scale: resize down the picture by dividing the dimension by the scale

  2. colors: how many colors in the target result

  3. quantize color: leverage libimagequant or not

  4. apply RGB555: reduce colors to 16bit

  5. crop to SNES size: center crop the resize picture dimensions if they exceeed SNES screen size (256x224)

  6. rescale post-process: resize back up by the same scale the resulting picture

Images made by this model

No Images Found.