Aller au contenu
Node packVérifiéExterne
Ouvrir la source

lora-stacker-civitai-tags

Simple Comfyui plugin to make working with lora stackers easier.

Mainteneur@KoleTackneyBClasse

Profil du package

Statut
Vérifié
Éditeur
@KoleTackney
Source
GitHub

LIREMOI

LoRA Stacker CivitAI Tags

Automatically fetches the trained trigger words (tags) for every LoRA in a stack from CivitAI and returns them as a ready-to-use prompt string.

[!WARNING] This node requires Efficiency Nodes for ComfyUI. It consumes the LORA_STACK type produced by the Efficient Loader / LoRA Stacker nodes in that pack. Install it first — this node will not function without it.

Quickstart

  1. Install ComfyUI.
  2. Install ComfyUI-Manager.
  3. Install Efficiency Nodes for ComfyUI (required dependency — see warning above).
  4. Look up LoRA Stacker CivitAI Tags in ComfyUI-Manager and install it. If installing manually, clone this repository under ComfyUI/custom_nodes.
  5. Restart ComfyUI.

Features

  • LoRA Stacker Tags (CivitAI) — Given a LORA_STACK, looks up each LoRA's trained trigger words on CivitAI via its SHA-256 hash and returns them as a single comma-separated string ready to inject into a prompt.
  • Passes the LORA_STACK through unchanged (fully compatible with Efficiency nodes and similar stacker nodes).
  • Caches results in loras_tags.json alongside the node so repeat runs don't hit the API.
  • force_fetch flag bypasses the cache and re-queries CivitAI.
  • Optionally prepends an existing prompt string via the opt_prompt input.

Nodes

LoRA Stacker Tags (CivitAI) — LoraStackerTagsQuery

Inputs

NameTypeDescription
lora_stackLORA_STACKStack of LoRA models from a LoRA stacker node
query_tagsBOOLEANQuery CivitAI for LoRAs not already cached (default: true)
print_tagsBOOLEANPrint retrieved tags to the ComfyUI console (default: false)
force_fetchBOOLEANIgnore cache and re-fetch from CivitAI (default: false)
separatorSTRINGDelimiter placed between tags (default: ", ")
opt_promptSTRING(optional) Prompt string to prepend before the tags

Outputs

NameTypeDescription
LORA_STACKLORA_STACKPass-through, unchanged
TAGSSTRINGTrained words from CivitAI, joined by separator

Dependencies: requests (installed automatically). Requires internet access to query the CivitAI API.

Develop

To install the dev dependencies and pre-commit (will run the ruff hook), do:

cd lora-stacker-civitai-tags
pip install -e .[dev]
pre-commit install

The -e flag above will result in a "live" install, in the sense that any changes you make to your node extension will automatically be picked up the next time you run ComfyUI.

Publish to Github

Install Github Desktop or follow these instructions for ssh.

  1. Create a Github repository that matches the directory name.
  2. Push the files to Git
git add .
git commit -m "project scaffolding"
git push

Writing custom nodes

An example custom node is located in node.py. To learn more, read the docs.

Tests

This repo contains unit tests written in Pytest in the tests/ directory. It is recommended to unit test your custom node.

  • build-pipeline.yml will run pytest and linter on any open PRs
  • validate.yml will run node-diff to check for breaking changes

Publishing to Registry

Nœuds dans ce pack

Nœud 1
  • LoraStackerTagsQuery

Sources

3 sources
GitHubSourceVersion 67944160f373047b98a4283225bc561d29a75baa
github.com/KoleTackney/lora-stacker-civitai-tags

Vérifié 25 oct.

Extraits de sources

1 extrait

Source context: Repo KoleTackney/lora-stacker-civitai-tags