[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-80063":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":14,"stars7d":16,"stars30d":16,"stars90d":15,"forks30d":15,"starsTrendScore":17,"compositeScore":18,"rankGlobal":9,"rankLanguage":9,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":22,"hasPages":20,"topics":23,"createdAt":9,"pushedAt":9,"updatedAt":24,"readmeContent":25,"aiSummary":26,"trendingCount":15,"starSnapshotCount":15,"syncStatus":14,"lastSyncTime":27,"discoverSource":28},80063,"neme-anima","negaga53\u002Fneme-anima","negaga53","3-step all-in-one LoRA builder for Anima (extract -> tag -> train)",null,"Python",65,7,62,2,0,3,6,48.51,"MIT License",false,"main",true,[],"2026-06-12 04:01:26","# Neme-Anima\n\nA three-step character LoRA builder:\n\n1. Extract crops of one or more characters from a video using reference images.\n2. Auto-tag each crop with WD14 danbooru tags and natural-language captions, then reorganize the dataset from the UI.\n3. Train a LoRA per character on Anima with the parameters already wired in.\n\nThe extractor and tagger are model-agnostic and produce output sized for kohya-ss \u002F OneTrainer \u002F sd-scripts on SDXL-class anime models (Pony, Illustrious, NoobAI, vanilla SDXL). The trainer targets Anima.\n\n\u003Cp align=\"center\">\u003Cimg src=\"docs\u002Fchie.png\" alt=\"Result with a Chie LoRA applied to Anima\" width=\"50%\">\u003C\u002Fp>\n\n## Pipeline\n\nFor each video:\n\n1. PySceneDetect splits it into shots.\n2. DeepGHS YOLO (via `imgutils`) detects characters per frame.\n3. ByteTrack links detections into per-shot tracklets.\n4. CCIP matches tracklets to each character's reference images and assigns tracklets to whichever character scores best (or rejects them if no character matches).\n5. 1–3 frames per kept tracklet are picked by sharpness, visibility, and aspect ratio.\n6. Each pick is cropped at longest-side 1024 with the original background.\n7. CCIP runs over the kept crops a second time to drop near-duplicates inside a sliding window.\n8. WD14 EVA02-Large v3 writes a kohya-style `.txt` next to each `.png`.\n\nDetections and tracklets are cached so threshold re-runs skip the slow stages.\n\n## Requirements\n\nSystem packages (`install_and_run.sh` installs these via apt on Debian\u002FUbuntu\u002FWSL2; install manually on other distros):\n\n- `ffmpeg` (used by the UI for video thumbnails, segment previews, and probing)\n- `git` (used to clone the trainer)\n\nFor the extractor\u002Ftagger:\n\n- NVIDIA GPU, 4 GB VRAM minimum, 8 GB comfortable\n\nFor the trainer:\n\n- Linux \u002F WSL2 with CUDA 12.4+\n- NVIDIA GPU, 6 GB VRAM minimum, 18 GB for full res LoRA\n\n## One-click install and run\n\n```sh\ngit clone https:\u002F\u002Fgithub.com\u002Fnegaga53\u002Fneme-anima.git\ncd neme-anima\nbash install_and_run.sh\n```\n\nThe script installs `uv` and Node.js if they aren't already on the system, syncs the Python deps, builds the frontend, clones `tdrussell\u002Fdiffusion-pipe` into `~\u002Fdiffusion-pipe` and sets up its Python 3.12 venv, downloads the three Anima training weights (~14 GB) from HuggingFace, prefills the four trainer paths in the UI's Settings tab, and starts the server.\n\nRe-running it is safe (will skip anything already in place). To update an existing one-click install, run `git pull --ff-only` and then run `bash install_and_run.sh` again; the script rebuilds the web UI.\n\nUseful environment overrides:\n\n| Variable | Default | What it does |\n|---|---|---|\n| `DIFFUSION_PIPE_DIR` | `~\u002Fdiffusion-pipe` | Where to clone diffusion-pipe |\n| `DIFFUSION_PIPE_PYTHON` | `3.12` | Python interpreter\u002Fversion for diffusion-pipe's venv |\n| `MODELS_DIR` | `~\u002F.cache\u002Fneme-anima\u002Fmodels` | Where to put the downloaded weights |\n| `SKIP_MODELS=1` | off | Skip the 14 GB weight download |\n| `SKIP_LAUNCH=1` | off | Install everything, but don't start the UI at the end |\n\nLinux \u002F WSL2 only. On Linux, Node.js is installed through apt (with sudo) when available, and through nvm otherwise.\n\n## Manual install \u002F After updating\n\n```sh\nuv sync --group gpu\n```\n\nFirst run downloads ~2.8 GB of weights (anime YOLOv8 person + face, CCIP, isnetis\u002Fanime-seg, WD14 with embeddings, CLIP base) to `~\u002F.cache\u002Fhuggingface\u002Fhub\u002F`.\n\n## CLI\n\n```sh\nuv run neme-anima project create ~\u002Fneme-projects\u002Fmegumin --name megumin\nuv run neme-anima project add-ref ~\u002Fneme-projects\u002Fmegumin \u002Fpath\u002Fto\u002Fportrait.png\nuv run neme-anima project add-video ~\u002Fneme-projects\u002Fmegumin \u002Fpath\u002Fto\u002Fep01.mkv\nuv run neme-anima project add-video ~\u002Fneme-projects\u002Fmegumin \u002Fpath\u002Fto\u002Fep02.mkv\nuv run neme-anima project extract ~\u002Fneme-projects\u002Fmegumin\n```\n\nProject folder layout:\n\n```\n~\u002Fneme-projects\u002Fmegumin\u002F\n  project.json\n  refs\u002F\n  output\u002F\n    kept\u002F             ep01__s003_t012_f000847.png + .txt\n    rejected\u002F\n    metadata.jsonl\n    cache\u002F\u003Cstem>\u002F     scenes.parquet, tracklets.parquet\n```\n\nRe-run with new thresholds (skips detection + tracking):\n\n```sh\nuv run neme-anima project rerun ~\u002Fneme-projects\u002Fmegumin --video ep01\n```\n\n## Web UI\n\nAfter cloning the repository, or after `git pull` when updating, install\u002Fupdate the frontend dependencies and rebuild the static UI bundle:\n\n```sh\ncd frontend && npm install && npm run build && cd ..\n```\n\n`git pull` alone can leave you running the old UI because the built files in `src\u002Fneme_anima\u002Fserver\u002Fstatic\u002F` are generated locally and not committed.\n\nThen start the server:\n\n```sh\nuv run neme-anima ui\n```\n\nBinds to `127.0.0.1:\u003Crandom-port>` and opens the SPA. Tabs: Sources, Frames, Training, Settings.\n\n### Sources\n\nAdd MKV\u002FMP4 videos and reference images.\n\n![Sources tab](docs\u002Fneme-anima_extract.png)\n\n### Frames\n\n- Add or remove images from the dataset (using drag&drop).\n- Edit tags inline by clicking a pill; edit the natural-language description in the same panel.\n- Search across the dataset by tag.\n- Bulk-edit tags with regex replace, with live preview.\n- Re-crop any image.\n- Filter by character with the chips at the top of the tab. Move a frame to a different character or also-assign it to a second character.\n\nSelection: shift-click ranges, ctrl-click multi-toggle, `A` select all, `D` \u002F `Esc` deselect. Hover a thumbnail for the tag overlay.\n\n![Frames tab](docs\u002Fneme-anima_frames.png)\n\n### Training\n\nLoRA training with stop\u002Fresume and checkpoint retention. Targets Anima. One LoRA per character, queued sequentially.\n\nTwo per-character knobs sit alongside the standard rank\u002Falpha\u002Flr settings:\n\n- Core-tag pruning. Compute the tags that show up in more than X% of a character's frames (default 35%) and drop them from the captions at staging time. Turns \"long hair, blue eyes, school uniform, smile, ...\" into just \"smile, ...\" for a character whose hair, eyes, and outfit are constants. The LoRA learns those from the visuals; the caption only adds noise. Off by default; opt in once you've reviewed the suggested list.\n- Repeat multiplier. Over- or under-sample a character's frames in the dataset. `0.0` is auto, computed from relative frame counts so a 50-frame character isn't drowned by a 500-frame one. A positive value pins it manually.\n\n![Training tab](docs\u002Fneme-anima_train.png)\n\nTraining is run through [tdrussell\u002Fdiffusion-pipe](https:\u002F\u002Fgithub.com\u002Ftdrussell\u002Fdiffusion-pipe), which has to be set up separately:\n\n```sh\ngit clone https:\u002F\u002Fgithub.com\u002Ftdrussell\u002Fdiffusion-pipe ~\u002Fdiffusion-pipe\ncd ~\u002Fdiffusion-pipe\nuv venv --python 3.12\nuv pip install --python .venv\u002Fbin\u002Fpython -r requirements.txt\n```\n\nThen in the Settings tab, point `diffusion_pipe_dir` at that clone and set the Anima DiT, Qwen VAE, and Qwen 3 0.6B text encoder paths (separate download on Huggingface).\n\n### Settings\n\nPer-project threshold overrides (frame stride, identification distance, crop padding, etc.).\n\nProject state lives in the project folder. The only server-side file is `~\u002F.neme-anima\u002Fdb.sqlite` (project registry).\n","Neme-Anima 是一个用于构建角色LoRA模型的三步骤一体化工具，包括从视频中提取角色图像、自动标注以及训练。该项目使用Python开发，支持通过参考图像从视频中裁剪出一个或多个角色，并利用WD14 danbooru标签和自然语言描述自动为每张裁剪图添加标签，最后基于Anima平台训练每个角色的LoRA模型。其核心功能包括模型无关的角色检测与跟踪、高质量图像选择及去重处理等。适用于需要快速创建个性化动漫风格角色模型的场景，特别是在拥有适当硬件配置（如NVIDIA GPU）的情况下，能够高效完成从数据准备到模型训练的全过程。","2026-06-11 03:59:06","CREATED_QUERY"]