adbrasiandClaude Opus 4.7 ef936e10b9 Corrige PixAI ONNX: seleciona output de logits em vez de embedding
model.onnx do deepghs/pixai-tagger-v0.9-onnx tem dois outputs:
- output 0: (N, 1024) embedding do encoder EVA-02
- output 1: (N, 13461) logits das tags (head fundido)

O codigo pegava outputs[0] (embedding) e quebrava com shape mismatch
contra is_character (13461,). Agora seleciona o output cujo shape
bate com num_classes (tags_arr.shape[0]), com fallback para o output
de maior dimensao final.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 14:44:20 -03:00

booru-helper-mini

ComfyUI custom node pack with three separate tagger nodes:

  • WD14 Tagger — SmilingWolf WD14 models (ONNX)
  • Camie Tagger — Camais03/camie-tagger-v2 (ONNX)
  • PixAI Tagger — pixai-labs/pixai-tagger-v0.9 (PyTorch, default) or deepghs/pixai-tagger-v0.9-onnx (ONNX, no auth required)

Install in ComfyUI/custom_nodes/booru-helper-mini and run:

pip install -r requirements.txt

torch and torchvision are provided by ComfyUI itself; timm is only required for the PixAI PyTorch backend.

Features

  • Three independent nodes — pick the model you need
  • Real ONNX batching with user-defined batch_size
  • LRU session caching (switching between WD14 variants reuses loaded sessions)
  • Tuned ort.SessionOptions + CUDA provider options for fast inference
  • Vectorized threshold selection with numpy
  • PixAI: FP16 support on CUDA, optional IP (copyright/series) mapping
  • Output is a list of strings (one per image in the batch)

PixAI — HuggingFace token

The official PyTorch repo is gated. Set a token via env var before launching ComfyUI:

export HF_TOKEN="hf_..."

Or paste it into the hf_token field of the PixAI node. If you don't have access, switch the node's backend to onnx and it will use deepghs/pixai-tagger-v0.9-onnx instead (no auth needed).

Models directory

Models are stored under ./models/{wd14,camie,pixai}/ inside the node folder. If your ComfyUI has a wd14_tagger folder registered in folder_paths, that one is used as base instead.

S
Description
No description provided
Readme
108 KiB
Languages
Python 100%