Agent skill

Bucketing

by sorryhyun in 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.

MITAuto-check passedDevelopment

Install Bucketing

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

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

GitHub CLI
$ gh skill install sorryhyun/anima_lora bucketing --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/bucketing .claude/skills/bucketing && 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
bucketing
GitHub stars
125
Token cost
~932 tokens
SKILL.md length
446 words
Files
1
Skills in repo
12
Repo updated
First seen
Licence
MIT

At a glance

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.

  • Development work in your project
  • SKILL.md covers Tiers, Compile coupling and Caches are the source of truth
  • Calls make

What it does

Bucketing is an agent skill from 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. Load before touching resize/bucket code, changing a tier or band, debugging graph recompiles or token counts, or reasoning about which images landed where.

Its SKILL.md is about 930 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 Development. The repository describes itself as: optimized anima lora training script. The licence is MIT.

When your agent uses it

  • Development work in your project

Example prompts

  • “/bucketing”

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

Bucketing loads about 932 tokens when it runs. Until then it costs about 91 tokens; SKILL.md has 446 words of instructions outside code blocks.

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

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 passed

The automated check found no risky patterns in SKILL.md.

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). 446 words, ~932 tokens.

Download SKILL.mdSave it as .claude/skills/bucketing/SKILL.md (or your agent's skills folder).
name
bucketing
description
Free-fit native-shape bucketing — the token bands per edge tier, tier choice at preprocess time, the compile_dynamic_seq coupling and per-tier graph budget, and why training never needs --target_res. Load before touching resize/bucket code, changing a tier or band, debugging graph recompiles or token counts, or reasoning about which images landed where.

Free-fit bucketing

Free-fit is the sole resize mode: each image keeps its native aspect ratio and lands its patch-grid token count anywhere inside its tier's band, driving crop loss to ~zero (sub-patch <16px residual). The discrete CONSTANT_TOKEN_BUCKETS pool it replaced is gone from the resize path; the name survives only in older docs and node READMEs.

Ownership: freefit_bucket / freefit_band_for_edge are owned by anime_tools.buckets, re-exported by library/datasets/buckets.py the way library/models/pe.py re-exports the PE tower. The resize pass itself is the package's anime_tools.stages.resize, which make preprocess-resize runs as a ResizeRequest (see the anime-tools skill). Design: _archive/proposals/free_aspect_token_band_resize.md.

Tiers

EDGE_TOKEN_BANDS defines per-tier bands for edges 512 768 896 1024 1280 1536:

EdgeToken families
5121008, 1024
7682160
8963000, 3024
10244032, 4200
12806300
15368640

Preprocess --target_res <subset> selects which tiers are active; each image goes to the tier that resizes it the least — choose_edge is an area-based |log(nominal_tokens/native_tokens)| minimum, scale-symmetric, so a 0.95MP image stays at 1024 rather than downscaling to 768.

The 1024 tier's band is frozen at (4032, 4200) (FREEFIT_FROZEN_EDGES) because the frozen top-5 aspect set (DCW_ASPECT_BUCKETS, consumed by CNS calibration + mod-distill) is drawn from it. All tiers stay within the rope cap (≤256 patches/axis).

Compile coupling

Free-fit populates many distinct (W,H) inside a tier's band, which would explode the static N-graph cascade, so it requires compile_dynamic_seq — auto-enabled by train.py whenever torch_compile is on, and unconditionally forced in the bespoke distill loops via ensure_dynamic_seq_for_freefit. dynamic_seq marks only the seq axis dynamic and bounds it to the tier's seq_range, collapsing the whole band to one graph per tier.

Each forward runs at its real token count; compile_blocks() sets _native_flatten, which flattens each patch grid to a fake-5D (B, 1, seq_len, 1, D) shape so the block graph keys on token count alone — bit-exact to the eager 5D path.

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

Caches are the source of truth

make_buckets() uses the actual on-disk cached (W,H) as the bucket set, so nothing AR-snaps at load.

Training does not need --target_res (a preprocess-only knob): every cached latent exact-matches its true (W,H), and the compile_blocks(n_token_families=…) dynamo budget is derived from the buckets the path_pattern-filtered images actually populate (train.py::_derive_token_budget) plus the sample-prompt resolutions when sampling is enabled. A sample prompt outside the training range added to the file mid-run is skipped with a warning at sample time.

Snap-era caches still train fine — a snap pool is just a free-fit pool that landed only on the old discrete counts. Re-preprocess only to gain the reduced-crop benefit.

After a target_res tier change run make preprocess-reconcile (dry-run; ARGS="--delete" to act) to drop the orphaned latent npz / stale resized PNG / PE sidecar / mask for every image whose bucket moved. TE caches are text-only and never touched.

© 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/bucketing of sorryhyun/anima_lora.

Open the folder on GitHubat commit 6fee07b

Compare with similar skills

Bucketing 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.

Bucketing compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Bucketing this skillsorryhyun/anima_lora125—~932Automated safety check: PassMIT
Vercel Composition Patternssupabase/supabase111k58 repos~726Automated safety check: PassMIT
Finishing a Development Branchobra/superpowers297k5 repos~1.9kAutomated safety check: PassMIT
Typescript Advanced Typesrolling-scopes/rsschool-app10k25 repos~4.2kAutomated safety check: PassMPL-2.0
PR Babysitteropeninterpreter/openinterpreter69k3 repos~4.2kAutomated safety check: PassApache-2.0
Code Review ChecklistshareAI-lab/learn-claude-code78k4 repos~1.1kAutomated safety check: PassMIT

Similar skills

  • Official

    React composition patterns that scale. An agent skill from supabase/supabase.

    111k GitHub starsUsed in 58 repos~726 tokens
    DevelopmentAuto-check passed
  • Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.

    297k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Typescript Advanced Types

    rolling-scopes/rsschool-app

    Master TypeScript's advanced type system including generics, conditional types, mapped types, template literals, and utility types for building type-safe applications.

    10k GitHub starsUsed in 25 repos~4.2k tokens
    DevelopmentAuto-check passed
  • PR Babysitter

    openinterpreter/openinterpreter

    Watches an open GitHub pull request until it merges, handling review comments, diagnosing CI failures and retrying flaky checks along the way.

    69k GitHub starsUsed in 3 repos~4.2k tokens
    DevelopmentAuto-check passed
  • Code Review Checklist

    shareAI-lab/learn-claude-code

    Reviews code against a five-part checklist covering security, correctness, performance, maintainability and testing, and reports findings in a fixed format.

    78k GitHub starsUsed in 4 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Greploop

    onyx-dot-app/onyx

    Iteratively improves a PR (GitHub), MR (GitLab), or shelved changelist (Perforce) until Greptile gives it a 5/5 confidence score with zero unresolved comments.

    32k GitHub starsUsed in 4 repos~3.3k tokens
    DevelopmentAuto-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
  • Qwen21

    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…

    125 GitHub stars~1.9k tokensUpdated today
    Auto-check: notes
  • 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
  • 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

Categories

Questions about Bucketing

What does Bucketing do?

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. Bucketing is an agent skill from 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.

When should I use Bucketing?

Bucketing fits situations like: development work in your project.

How do I install Bucketing in Claude Code?

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

How do I install Bucketing in Codex?

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

Can I use Bucketing 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 bucketing -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/bucketing, .gemini/skills/bucketing, .github/skills/bucketing and .opencode/skills/bucketing in your project.

What does Bucketing need to run?

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

Does Bucketing 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 Bucketing safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Bucketing use?

Bucketing 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 Bucketing use?

About 932 tokens (SKILL.md is roughly 3.7k 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 Bucketing?

Skills that share tags, products or a category with Bucketing: Vercel Composition Patterns (supabase/supabase, 111k stars), Finishing a Development Branch (obra/superpowers, 297k stars), Typescript Advanced Types (rolling-scopes/rsschool-app, 10k stars) and PR Babysitter (openinterpreter/openinterpreter, 69k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Bucketing?

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.