{"id":50866752,"url":"https://github.com/the-database/animejanai-inference","last_synced_at":"2026-06-17T06:01:19.448Z","repository":{"id":364203477,"uuid":"1266539311","full_name":"the-database/animejanai-inference","owner":"the-database","description":null,"archived":false,"fork":false,"pushed_at":"2026-06-15T00:40:11.000Z","size":519,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-15T02:28:53.497Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/the-database.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-11T18:01:32.000Z","updated_at":"2026-06-15T00:35:30.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/the-database/animejanai-inference","commit_stats":null,"previous_names":["the-database/animejanai-inference"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/the-database/animejanai-inference","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-database%2Fanimejanai-inference","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-database%2Fanimejanai-inference/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-database%2Fanimejanai-inference/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-database%2Fanimejanai-inference/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/the-database","download_url":"https://codeload.github.com/the-database/animejanai-inference/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-database%2Fanimejanai-inference/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34435981,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-17T02:00:05.408Z","response_time":127,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-15T02:07:49.601Z","updated_at":"2026-06-17T06:01:19.422Z","avatar_url":"https://github.com/the-database.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# animejanai-inference\n\nInference shim for the native mpv AnimeJaNai pipeline. `libaji` exposes a\nstrict C ABI (`include/aji.h`) that `vf_animejanai` in the\n[the-database/mpv](https://github.com/the-database/mpv) fork loads at\nruntime — mpv never links TensorRT, so the backend and TRT version can be\nswapped without rebuilding the player, and on Windows the MSVC-built shim\ncoexists with a mingw-built mpv.\n\nCurrent backend: TensorRT (`src/aji_trt.cpp`) with CUDA pre/post kernels\n(`src/kernels.cu`): NV12/P010 → fp16 NCHW RGB (BT.709 limited) → engine →\nNV12/P010, all device-side. Phase 0 spike scope; chain selection,\nengine building, colorspace metadata and CUDA graphs land here in phase 1.\n\n## Build (Linux)\n\nNeeds CUDA toolkit 13.x and TensorRT 10.x (default path:\n`~/sdk/tensorrt/usr`, override with `-DAJI_TRT_ROOT=`).\n\n```sh\nCUDACXX=/usr/local/cuda/bin/nvcc cmake -B build -S .\ncmake --build build -j\n```\n\n## Engine\n\n```sh\ntrtexec --onnx=models/\u003cmodel\u003e.onnx --fp16 \\\n        --minShapes=input:1x3x64x64 --optShapes=input:1x3x1080x1920 \\\n        --maxShapes=input:1x3x1088x1920 --saveEngine=models/\u003cmodel\u003e.engine\n```\n\n## Harness (no player needed)\n\n```sh\nffmpeg -i clip.mkv -frames:v 12 -pix_fmt p010le -f rawvideo in.raw\n./build/aji_harness --engine models/\u003cmodel\u003e.engine --input in.raw \\\n    --width 1400 --height 1080 --format p010 --output out.raw\n```\n\nReports device-side ms/frame for the full pre+infer+post chain\n(RTX 5090 reference: ~3.8 ms at 1920x1080→4K fp16).\n\n## mpv usage (spike)\n\n```sh\nmpv --hwdec=nvdec \\\n    --vf=animejanai=engine=models/\u003cmodel\u003e.engine:lib=build/libaji.so video.mkv\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthe-database%2Fanimejanai-inference","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthe-database%2Fanimejanai-inference","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthe-database%2Fanimejanai-inference/lists"}