Working with AI
Pixel art generation
Generating sprites and textures from a prompt in the Pixel Art editor, with ComfyUI and Ollama running on your own machine.
The Pixel Art window can turn a text prompt into a sprite, and recolour a region you describe in words. It uses two AI programs that you run yourself. Nothing is sent to Trisgram.
| Feature | Runs on | Default address |
|---|---|---|
| Generate a sprite from a prompt, or regenerate a selected region | ComfyUI (image model) | http://127.0.0.1:8188 |
| Find region ("make the cape red") | Ollama (language model) | http://127.0.0.1:11434 |
Set up ComfyUI
- Install ComfyUI and an SDXL checkpoint. For crisp results, add a pixel-art LoRA (the editor
is tuned for
pixel-art-xl.safetensors). - Start it with CORS enabled, so the editor page is allowed to call it:
python main.py --enable-cors-header- In the Pixel Art window, click the wrench (Setup):
- Image generation endpoint:
http://127.0.0.1:8188, then Test. - Workflow: Pixel art, prompt only (or start from the canvas, which uses your drawing as a starting point).
- List models on the endpoint, then pick your Checkpoint and LoRA.
- Save settings.
- Image generation endpoint:
Generate
Type a prompt under the canvas and press Generate (it becomes Cancel while working). In the options (≡):
- Remove background: transparent sprite.
- Crop to subject.
- Denoise: for the start from the canvas workflow; 0.25–0.55 keeps your drawing's shape.
Style presets (in Setup) add to every prompt: full body, centred, side view, top-down view, portrait, single item, centred.
Prompts that work well: short, concrete, art-directed. "golden coin, single item, centred, plain background", "knight with red cape, side view, full body", "mossy stone wall tile, top-down".
Region recolour with Ollama
- Install Ollama and pull a model:
ollama pull llama3.2. - Start it allowing the editor's origin, then fill in Region select endpoint and Model in Setup:
OLLAMA_ORIGINS=https://editor.trisgine.com ollama serve- Type "make the cape red" and press Find region. The model picks one region, and you confirm before any pixels change.
Custom workflows
A ComfyUI workflow (.json) works if it contains the literal placeholder %PROMPT%.
%CHECKPOINT% and %LORA% are filled in from Setup.