Black Magik Studios Documentation

Grimoire

Tools

Utility workflows for pixelization, palette reduction, Wang tilesets, resize, workflow JSONs, background removal, and reference generation.

What Is This?

The Tools tab provides utility actions that sit beside the main generation tabs. These are not prompt-first workflows. Choose a Tool Mode to switch between pixelization, palette reduction, Wang tilesets, sprite resize, custom ComfyUI workflows, background removal, and ControlNet reference generation.

Tools Tab


Pixelization

Pixelization makes the active sprite chunkier and more retro-looking. It can run as a standalone tool, or you can enable similar processing from the local generation tabs with Automatic Postprocessing.

Mode What It Does
Standard Pixelate Uses block averaging across the current canvas.
Neural Pixelate Uses the packaged neural pixelization model for a more model-driven result.

Use Scale Factor to control how large the pixel blocks become. Standard mode accepts numeric scale values from 1 to 8; Neural mode offers 2 to 8. Click Pixelize Canvas to process the active sprite.

Pixelization runs through the Workflow Queue for progress and cancellation.


Palette Reduction

Palette Reduction merges similar colors in the active sprite down to a target count. Set Max Colors between 1 and 256, then click Reduce Palette.

Use this after generation or pixelization when you want a simpler palette before final cleanup in Aseprite.

Palette Reduction runs through the Workflow Queue for progress and cancellation.


Wang Tileset Generator

Generates a complete Wang tileset from a 96x96 source sprite.

How To Use

  1. Open a 96x96 sprite in Aseprite.
  2. Click Generate Wang Tileset.
  3. Black Magik returns a new 160x96 output.

Use this when you already have a terrain source tile arrangement and want the extension to build the full Wang output automatically.

Wang Tileset generation runs through the Workflow Queue for progress and cancellation.

Wang Tileset Source Example

Wang Tileset Output Example


Sprite Resize

Sprite Resize contains Black Magik’s K-centroid resize plus a shortcut to Aseprite’s own Sprite Size dialog. K-centroid resize divides the source into tiles and assigns each output pixel the dominant color centroid from its tile, which is useful for controlled pixel-art resizing.

Controls

Control What It Does
Width / Height Target output size. Values are clamped to valid positive dimensions.
Lock Ratio Keeps the original aspect ratio while you change one dimension.
Centroids Number of candidate color clusters per tile. Higher values preserve more local variation.
Iterations How many refinement passes the tile clustering runs for. Higher values are slower but more stable.

Good defaults

  • Start with Centroids = 2
  • Start with Iterations = 3
  • Use it for downscaling only

K-centroid resize runs through the Workflow Queue for progress and cancellation.


Official Aseprite Resize

This button opens Aseprite’s own Sprite Size dialog for the active sprite. Use it when you want the stock Aseprite resize workflow without leaving Grimoire.


Custom ComfyUI Workflows (Experimental)

This mode lets you run an arbitrary ComfyUI workflow JSON file directly from Aseprite.

What It Accepts

  • Raw ComfyUI API-format node dictionaries
  • Exported workflow files that wrap the node data under workflow or prompt

What Black Magik Does For You

  • Adds a SaveImageWebsocket node if the workflow has a usable image output but no websocket return node
  • Exports the current Aseprite canvas into LoadImage nodes when the workflow needs image inputs
  • Validates the JSON before sending it

Limitations

  • It is experimental and not every workflow will be compatible
  • Complex multi-output graphs may not return the image you expect
  • Workflows that depend on missing models or custom nodes still fail the same way they would in ComfyUI

Open ComfyUI Server

In Custom ComfyUI Workflows, click Open ComfyUI Server to open the local ComfyUI web interface in your default browser. Use it when you want to inspect nodes, debug a workflow visually, or build a JSON workflow to bring back into the experimental runner.


Background Removal

Removes the background from the active sprite using Inspyrenet Rembg and returns the cutout into Aseprite.

Notes

  • Works best with clear foreground/background separation
  • The generated result is returned as a new visible output layer or sprite
  • Requires the installed Inspyrenet Rembg node from the Black Magik setup

Background Removal Example


ControlNet Reference Generator

Generates a structural reference image from your active sprite that can then be used as a ControlNet control image.

Why Use This?

Before using the ControlNet tab, you often need a preprocessed “map” image (pose, depth, etc.) rather than the raw photo or sprite. This tool creates those maps directly from your Aseprite sprite.

Reference Methods

OpenPose

Detects human body landmarks (skeleton joints) in your sprite and generates a stick-figure pose diagram. Use this when you want to control the pose of a character in a generation.

  • Input: Your active sprite should contain a clearly recognizable human or humanoid figure.
  • Output: A stick-figure skeleton image (COCO format) showing the body keypoints.
  • Use in ControlNet with: An OpenPose-trained ControlNet model.

Depth Map

Analyzes your sprite and generates a grayscale depth map where bright areas are close to the viewer and dark areas are far away. Use this when you want to control the spatial layout and depth of a generation.

  • Input: Any sprite — works best with scenes that have clear foreground/background separation.
  • Output: A grayscale image. White = nearest, black = farthest.
  • Uses: Depth Anything V3 model (downloaded automatically if not present).
  • Use in ControlNet with: A Depth-trained ControlNet model.

How to Use

  1. Open the sprite you want to analyze in Aseprite (it must be the active sprite).
  2. Choose a Reference Method (openpose or depthmap).
  3. Click Generate ControlNet Reference.
  4. The result is saved to the ComfyUI output folder and displayed as a new sprite in Aseprite.
  5. Switch to the ControlNet tab, select the saved image as your control image, and generate.

Reference Examples

ControlNet Source Image

OpenPose Extraction

Depth Extraction