Agent skill

Qwen21

by sorryhyun in sorryhyun/anima_lora

Qwen-Image-2.1 LoRA line (NOT Anima) — running cache/train through the daemon, make gui-qwen, the CacheRequest/TrainRequest flag surface and how to add a field, model-dir resolution, cache layout…

MITAuto-check: notesAI & LLM Engineering

Install Qwen21

skills CLI
$ npx skills add sorryhyun/anima_lora --skill qwen21 -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install sorryhyun/anima_lora qwen21 --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/sorryhyun/anima_lora.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/qwen21 .claude/skills/qwen21 && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
qwen21
GitHub stars
125
Token cost
~1.9k tokens
SKILL.md length
843 words
Files
1
Skills in repo
12
Repo updated
First seen
Licence
MIT

At a glance

Qwen-Image-2.1 LoRA line (NOT Anima) — running cache/train through the daemon, make gui-qwen, the CacheRequest/TrainRequest flag surface and how to add a field, model-dir resolution, cache layout…

  • Works in 3 steps: Add the field with _f(default, help,… → Read it in run_cache / run_train /… → For the Chinese GUI, add FIELDS_CN[name]…
  • Tasks that involve Fine-tuning
  • SKILL.md covers Layout, Running, Flags — one definition and Gotchas
  • Calls make

What it does

Qwen21 is an agent skill from sorryhyun/anima_lora. Qwen-Image-2.1 LoRA line (NOT Anima) — running cache/train through the daemon, make gui-qwen, the CacheRequest/TrainRequest flag surface and how to add a field, model-dir resolution, cache layout, swap sizing, and the gotchas (flat stem-keyed cache, --no-x flag spelling, stall budget, GUI-side chain, Test A/B generation). Load before running, changing, or debugging anything under library/qwen21/, scripts/qwen21/, gui/qwen21/ or project/qwen21lora/.

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in AI & LLM Engineering, covering Fine-tuning. It works with Qwen. The repository describes itself as: optimized anima lora training script. The licence is MIT.

When your agent uses it

  • Tasks that involve Fine-tuning

Example prompts

  • “/qwen21”

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Add the field with _f(default, help, choices=…, advanced=…, multiline=…).
  2. Read it in run_cache / run_train / run_generate.
  3. For the Chinese GUI, add FIELDS_CN[name] in gui/qwen21/strings.py

What it can do on your machine

Read from SKILL.md and the folder at commit 6fee07b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • make

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Qwen21 loads about 1.9k tokens when it runs. Until then it costs about 116 tokens; SKILL.md has 843 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~116
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:54
    ir` → `$ANIMA_QWEN21_MODEL_DIR` (env or `.env`) → `models/qwen_image_2.1`. On

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from sorryhyun/anima_lora at commit 6fee07b, republished under its MIT licence (© sorryhyun). 843 words, ~1,863 tokens.

Download SKILL.mdSave it as .claude/skills/qwen21/SKILL.md (or your agent's skills folder).
name
qwen21
description
Qwen-Image-2.1 LoRA line (NOT Anima) — running cache/train through the daemon, `make gui-qwen`, the CacheRequest/TrainRequest flag surface and how to add a field, model-dir resolution, cache layout, swap sizing, and the gotchas (flat stem-keyed cache, --no-x flag spelling, stall budget, GUI-side chain, Test A/B generation). Load before running, changing, or debugging anything under library/qwen21/, scripts/qwen21/, gui/qwen21/ or project/qwen21_lora/.

Qwen-Image-2.1 LoRA (library/qwen21/)

Not Anima. Read library/qwen21/CLAUDE.md first — the root invariants (5D latents, max-padded text, free-fit bucketing, block-compile first) are wrong here. Research state and measured numbers: project/qwen21_lora/README.md + report.md.

Layout

WhereWhat
library/qwen21/core: loader / blockswap / lora / accel, cache.run_cache(req), train.run_train(req), generate.run_generate(req)
library/qwen21/requests.pytorch-free CacheRequest / TrainRequest / GenerateRequest — the one flag definition
library/qwen21/scan.pytorch-free folder/cache counts (GUI)
scripts/qwen21/{cache,train,generate}.pysidecar CLIs: Request.from_argv() → run_*
gui/qwen21/make gui-qwen window (en/cn)
project/qwen21_lora/src/one-off research scripts (backward_smoke, smoke_t2i, bench_accel)

tests/test_qwen21_boundary.py enforces the island: nothing Anima-side imports library.qwen21; it imports only library.env / library.runtime.{offloading,device,dynamo}; requests and gui.qwen21.app stay torch-free.

Running

GPU work goes through the daemon:

bash
make daemon-run ARGS="--stall-timeout 900 scripts/qwen21/cache.py --src 'post_image_dataset/resized/channel_(caststation)'"
make daemon-run ARGS="--stall-timeout 900 scripts/qwen21/train.py --epochs 8 --save_every_epochs 4"
make daemon-run ARGS="--stall-timeout 900 scripts/qwen21/generate.py --lora output/qwen21/qwen21_lora.safetensors"
make gui-qwen   # the same jobs from a window

Test / A-B generation (GenerateRequest, the Train tab's Test button): renders each prompt at every --multipliers scale (default 1.0,0.0) from one loaded model with the same seed, so the pair differs by the adapter only. set_multiplier(0) short-circuits every adapter, so no second model copy is loaded. The default prompt is BOCCHI_PROMPT — natural language, a character the base model already knows. --prompts_file (one per line, e.g. project/qwen21_lora/eval_prompts.txt) overrides it. Without --width/--height it renders square at --resolution, which is off-distribution for a portrait dataset. The GUI fills an empty lora with the Train tab's output, writes each run to out_dir/<timestamp>/, and shows the pair from its manifest.json.

Defaults: --src post_image_dataset/resized (walks subfolders; captions = the revised {stem}.txt, .variants.txt ignored), cache and LoRA under output/qwen21/. The research cache is project/qwen21_lora/cache — pass --out / --cache explicitly. Relative paths resolve under the repo home, not the CWD.

Model dir (diffusers layout: transformer/ text_encoder/ vae/ scheduler/): --model_dir → $ANIMA_QWEN21_MODEL_DIR (env or .env) → models/qwen_image_2.1. On the dev box that last one is a symlink to the NVMe copy. There is no catalog row yet.

Flags — one definition

A field on CacheRequest / TrainRequest / GenerateRequest is the CLI flag, its default, its help and the GUI widget at once. Adding one:

  1. Add the field with _f(default, help, choices=…, advanced=…, multiline=…).
  2. Read it in run_cache / run_train / run_generate.
  3. For the Chinese GUI, add FIELDS_CN[name] in gui/qwen21/strings.py (FIELDS_CN_GENERATE for a GenerateRequest field whose name means something else elsewhere, e.g. resolution). English needs nothing — the label is the field name, the help comes from the metadata.

Widget type follows the field: bool → checkbox, choices → combo, int with a non-None default → spin box, multiline → text box, everything else → line edit (empty = None for … | None fields). src/out/cache/model_dir/out_dir get a folder picker, output a save-file picker, lora/prompts_file an open-file picker.

to_argv() writes only non-default values, so a daemon job's argv reads as the choices made.

Show full SKILL.md (438 more words)Show less

Gotchas

  • Bool flags are --x / --no-x (BooleanOptionalAction), keeping the underscore: --no-grad_checkpointing, --no-save_crops. The pre-move --no_grad_checkpointing is gone.
  • The cache is flat, keyed by file stem. Caching refuses a source tree with the same stem in two subfolders; the GUI warns before submitting.
  • Caching skips existing files. An edited caption keeps its old embedding until --overwrite (or the .te file is deleted). The GUI counts these as stale.
  • Resolution is an area, not a crop. calculate_dimensions(res², aspect) keeps the native aspect with both edges on a multiple of 32. The image is resized, not cropped, so aspect drifts up to ~2 %. post_image_dataset/resized input is already Anima-resized, so it gets resampled twice.
  • Stall budget. The daemon's default command watchdog is 120 s. The text-encoder load and long passes can be quieter than that, so the GUI submits with 900 s; pass --stall-timeout 900 on the CLI too.
  • The GUI chains preprocess → train itself. Training is submitted only on cache success, so a failed cache never trains on a stale folder. Closing the window mid-chain drops the pending train job; the running cache job continues. The GUI re-attaches to a running qwen21-cache / qwen21-train / qwen21-test job on reopen.
  • Progress comes from stdout lines, not progress.jsonl: text i/n, latents i/n, step i/n, image i/n. Keep that shape if you change the prints — the GUI's bar parses it (tqdm bars too, but tqdm's \r redraws only reach the log at the next newline, so the denoise bar arrives in one burst).
  • Swap sizing. report_fit prints after step 1 with a --blocks_to_swap suggestion measured against mem_get_info free. At 1024² the step is compute-bound, so fewer swaps doesn't make it faster (see library/qwen21/CLAUDE.md). The reserve the sizer leaves for activations follows the cache: a checkpointed step holds 0.3 GB + 0.6 MB × (largest image + text token count) (measured 2026-09-24, affine to 6746 tokens, text and image tokens cost the same — project/qwen21_lora/report.md § Activation cost per token), plus one block of allocator slack (blockswap.activation_reserve_for_tokens). That is 3.3 GB at 4096+346 tokens, where the old constant 3.5 left 0.5 GB spare and 2.0 OOMed at step 1; ~1.5 GB for 512² data. --activation_reserve_gb overrides it with a constant.
  • Block compile is on by default (--compile_seq dynamic, torch.compile(dynamic=True)): −11 % per step where the step is compute-bound, ~40 s of compile at step 1, one graph for every sample size. --no-compile for a quick smoke; --compile_seq bounded is the same speed with the compile paid as 17 s + one recompile (accel.compile_blocks).
  • RAM: the whole checkpoint is ~33 GB bf16 and sits in page cache on the 64 GB box. Reloads are ~free, so there is no resident-model worker; VRAM is the constraint.

© sorryhyun, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/qwen21 of sorryhyun/anima_lora.

Open the folder on GitHubat commit 6fee07b

Compare with similar skills

Qwen21 next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Qwen21 compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Qwen21 this skillsorryhyun/anima_lora125—~1.9kAutomated safety check: NotesMIT
Train RlOpenPipe/ART11k—~2.4kAutomated safety check: PassApache-2.0
Train SftOpenPipe/ART11k—~2.9kAutomated safety check: PassApache-2.0
Finetuning Model Onboardingovermind-core/overmind612—~3.2kAutomated safety check: PassAGPL-3.0
slime RL Post-TrainingOrchestra-Research/AI-Research-SKILLs13k4 repos~2.8kAutomated safety check: PassMIT
LlamafactoryPrism-Shadow/penguin-harness2.5k—~855Automated safety check: PassApache-2.0

Similar skills

  • Train Rl

    OpenPipe/ART

    RL training reference for the ART framework. An agent skill from OpenPipe/ART.

    11k GitHub stars~2.4k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Train Sft

    OpenPipe/ART

    SFT training reference for the ART framework. An agent skill from OpenPipe/ART.

    11k GitHub stars~2.9k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Finetuning Model Onboarding

    overmind-core/overmind

    Rules for adding a new model or model family to the finetuning pipeline, or changing finetuning behavior for an existing one — engine-agnostic customization via family hooks instead of if/else in…

    612 GitHub stars~3.2k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • slime RL Post-Training

    Orchestra-Research/AI-Research-SKILLs

    Guides reinforcement-learning post-training of LLMs with slime, which pairs Megatron-LM training with SGLang rollouts, including GRPO runs on GLM, Qwen3 and Llama 3 models.

    13k GitHub starsUsed in 4 repos~2.8k tokens
    AI & LLM EngineeringAuto-check passed
  • Llamafactory

    Prism-Shadow/penguin-harness

    Fine-tune LLMs with LlamaFactory — register datasets, train via YAML configs, merge LoRA adapters and serve the result.

    2.5k GitHub stars~855 tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Flux Txt2img

    artokun/comfyui-mcp

    Build Flux txt2img workflows with Flux.1 Dev (SRPO), Flux 2 Klein 9B, Turbo LoRAs, FluxGuidance, and DualCLIPLoader patterns

    803 GitHub stars~3k tokensUpdated 6 days ago
    AI & LLM EngineeringAuto-check passed

More from sorryhyun/anima_lora

All 12 skills in this repo
  • Model Catalog

    sorryhyun/anima_lora

    The model catalog (library/downloads.py) — one Asset row per weight (repo, files, destination, installed probe), packs, resolve() name order, and the rule that loaders import their default paths…

    125 GitHub stars~502 tokensUpdated today
    Auto-check passed
  • Anime Tools

    sorryhyun/anima_lora

    The trainer ↔ animetools boundary — what the curation split moved out, the typed request/stage API the make targets build, the git-pin dev loop and its stale-venv trap, and the tests that guard the…

    125 GitHub stars~1.5k tokensUpdated today
    Auto-check passed
  • Bucketing

    sorryhyun/anima_lora

    Free-fit native-shape bucketing — the token bands per edge tier, tier choice at preprocess time, the compiledynamicseq coupling and per-tier graph budget, and why training never needs --targetres.

    125 GitHub stars~932 tokensUpdated today
    Auto-check passed
  • Captions

    sorryhyun/anima_lora

    Caption pipeline — position-clause grammar (never hand-split a caption), make caption-autotag modes, make caption-position (v2 rewrite rules and gates), and the preprocess-stage wiring for both.

    125 GitHub stars~1.3k tokensUpdated today
    Auto-check passed
  • Custom Nodes

    sorryhyun/anima_lora

    The ComfyUI node map — which node lives in which standalone repo vs in-tree under customnodes/, where each is symlinked, and the vendor-sync rule for the vendor/ subsets.

    125 GitHub stars~470 tokensUpdated today
    Auto-check passed
  • Daemon

    sorryhyun/anima_lora

    Submit, monitor, and manage GPU jobs through the anima daemon (make daemon-, make gen, make run-status, MCP bridge, discovery).

    125 GitHub stars~2.1k tokensUpdated yesterday
    Auto-check passed

Works with

Questions about Qwen21

What does Qwen21 do?

Qwen-Image-2.1 LoRA line (NOT Anima) — running cache/train through the daemon, make gui-qwen, the CacheRequest/TrainRequest flag surface and how to add a field, model-dir resolution, cache layout…. Qwen21 is an agent skill from sorryhyun/anima_lora.1 LoRA line (NOT Anima) — running cache/train through the daemon, make gui-qwen, the CacheRequest/TrainRequest flag surface and how to add a field, model-dir resolution, cache layout, swap sizing, and the gotchas (flat stem-keyed cache, --no-x flag spelling, stall budget, GUI-side chain, Test A/B generation).

When should I use Qwen21?

Qwen21 fits situations like: tasks that involve Fine-tuning.

How do I install Qwen21 in Claude Code?

Run `npx skills add sorryhyun/anima_lora --skill qwen21 -a claude-code`. Or copy the skill folder (.claude/skills/qwen21 in sorryhyun/anima_lora) into .claude/skills/qwen21 in your project. Claude Code loads it when a task matches its description.

How do I install Qwen21 in Codex?

Run `npx skills add sorryhyun/anima_lora --skill qwen21 -a codex`. Or copy the skill folder (.claude/skills/qwen21 in sorryhyun/anima_lora) into .agents/skills/qwen21 in your project. Codex loads it when a task matches its description.

Can I use Qwen21 in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add sorryhyun/anima_lora --skill qwen21 -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/qwen21, .gemini/skills/qwen21, .github/skills/qwen21 and .opencode/skills/qwen21 in your project.

What does Qwen21 need to run?

Going by SKILL.md and its folder, Qwen21 needs the command-line tools its instructions call (make).

Does Qwen21 access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Qwen21 safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Qwen21 use?

Qwen21 is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Qwen21 use?

About 1.9k tokens (SKILL.md is roughly 7.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Qwen21?

Skills that share tags, products or a category with Qwen21: Train Rl (OpenPipe/ART, 11k stars), Train Sft (OpenPipe/ART, 11k stars), Finetuning Model Onboarding (overmind-core/overmind, 612 stars) and slime RL Post-Training (Orchestra-Research/AI-Research-SKILLs, 13k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Qwen21?

sorryhyun (a GitHub user) maintains it in sorryhyun/anima_lora, which has 125 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on October 11, 2026.

Source: sorryhyun/anima_lora on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.