Workflow.jpg
Hi everyone!
I've released a workflow to create Pixel Art using ComfyUI for my Bonus/Super patrons, and I wanted to explain how to use it correctly

Requirements
...

To use this workflow you'll need:

Optional Pixelation Extension
...

Once you have installed all the stuff above you'll also need to install the pixelization models (if you want to use the pixelation extension) Keep in mind that you won't be able to use the results commercially.
Download all three models from the table and place them into the checkpoints directory inside the extension at ComfyUI/custom_nodes/ComfyUI_pixelization/checkpoints.

How to
...

Pixelation warning
...

If you decided to not install the pixelation extension, you can just remove the node highlighted in red and you should be good to go.

First Settings
...

Pasted image 20240201144156.jpg
The first thing you need to set is the model you are going to use and the size of the picture. I usually do 384x768 which is a good resolution for both quality and performance.
You can also change the amount of denoising applied to the 2nd pass. This is used when upscaling the picture. If you don't know what it means you can leave it like that.

LoRA
...

Pasted image 20240201150349.jpg
In this section you can set the LoRA and its weight. This is not needed, you can just disable it if you just want to use the main model. Otherwise set it to the LoRA of your liking (I'm using my Pixel Art LoRA in this case)

Ranbooru
...

Pasted image 20240201150534.jpg
This is the part in which we use Ranbooru to parse random prompts from the selected booru. If you just want to test the workflow you can leave it like this otherwise you can change it to search for specific pictures.
You can also remove everything and just write a prompt normally in the Positive Prompt node.

Generation
...

Pasted image 20240201150720.jpg
Here we run the generation using the settings above. If you want you can increase the number of steps, change the CFG or the sampler. These are the parameters I usually have when working with Mistoon_Pearl

Resize
...

Pasted image 20240201150824.jpg
This step resizes the image using a standard algorithmic approach. I've set it to 2.5 times the size, but you can change this to your liking.

Upscale
...

Pasted image 20240201150923.jpg
In this block we run the SD model again on the resized picture and then we use AI to upscale it again and shrink it back to the required size.
Here you'll need to define the upscale model you'd want to use (see requirements) and change the desired width and height to match the ratio of your picture.
Otherwise you can keep everything as it is.

Pixelization
...

Pasted image 20240201151219.jpg
Right now there are two engines to convert the picture to Pixel Art:

  • The first block uses AI, it has better quality, but unfortunately is not usable for commercial purposes.
  • The second one uses a more "traditional" approach, it is slower and is less refined, but can be used commercially.
    Remember to disable the one you don't want to use (select it and ctrl+b), otherwise you'll apply both effects!

Output
...

Pasted image 20240201151419.jpg
Here you can see and save the final output. You also have two nice shortcuts:

  • Use last prompt: this locks the prompt scraped from Ranbooru to the last retrieved
  • LockSeed: this locks the seed to the last generation
    These can be really helpful to avoid running the upscale until you've found a good picture. Then you lock both, enable the upscale and run it again!