{"id":16286491,"url":"https://github.com/the-database/mpv-upscale-2x_animejanai","last_synced_at":"2026-04-02T17:31:09.107Z","repository":{"id":144421371,"uuid":"562333889","full_name":"the-database/mpv-upscale-2x_animejanai","owner":"the-database","description":"Real-time anime upscaling to 4k in mpv with Real-ESRGAN compact models","archived":false,"fork":false,"pushed_at":"2026-03-29T01:45:33.000Z","size":152542,"stargazers_count":635,"open_issues_count":20,"forks_count":14,"subscribers_count":13,"default_branch":"main","last_synced_at":"2026-03-29T04:31:32.063Z","etag":null,"topics":["4k","anime","anime-upscaling","esrgan","mpv","nvidia","real-esrgan","super-resolution","tensorrt","vapoursynth","video"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","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":"LICENSE","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":"2022-11-06T02:12:50.000Z","updated_at":"2026-03-29T02:47:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"b10e5942-d5c3-453e-a65a-496274f75642","html_url":"https://github.com/the-database/mpv-upscale-2x_animejanai","commit_stats":{"total_commits":264,"total_committers":3,"mean_commits":88.0,"dds":0.007575757575757569,"last_synced_commit":"55c76dd7fea76760b1cafd2c3eb284982d0131f4"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/the-database/mpv-upscale-2x_animejanai","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-database%2Fmpv-upscale-2x_animejanai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-database%2Fmpv-upscale-2x_animejanai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-database%2Fmpv-upscale-2x_animejanai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-database%2Fmpv-upscale-2x_animejanai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/the-database","download_url":"https://codeload.github.com/the-database/mpv-upscale-2x_animejanai/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-database%2Fmpv-upscale-2x_animejanai/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31311678,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T12:59:32.332Z","status":"ssl_error","status_checked_at":"2026-04-02T12:54:48.875Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["4k","anime","anime-upscaling","esrgan","mpv","nvidia","real-esrgan","super-resolution","tensorrt","vapoursynth","video"],"created_at":"2024-10-10T19:43:14.722Z","updated_at":"2026-04-02T17:31:09.059Z","avatar_url":"https://github.com/the-database.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Upscaling Anime in mpv with 2x_AnimeJaNai V3\n[![Discord](https://img.shields.io/discord/1121653618173546546?label=Discord\u0026logo=Discord\u0026logoColor=white)](https://discord.gg/EeFfZUBvxj)\n\n\u003ca href=\"./demov3.webp?raw=1\"\u003e\u003cimg src=\"demov3.webp\"/\u003e\u003c/a\u003e\n\u003cp align=\"center\"\u003e\u003csup\u003e(click image to enlarge)\u003c/sup\u003e\u003c/p\u003e\n\n## Overview\n\nThis project provides a collection of Real-ESRGAN Compact ONNX upscaling models, along with a custom build of mpv video player. The video player (currently Windows only), enables real-time upscaling of 1080p content to 4K by running these models using TensorRT (NVIDIA only) or DirectML (for AMD or Intel Arc). While the default configuration upscales using the 2x_AnimeJaNai models, it can be easily customized to utilize any Real-ESRGAN Compact ONNX models.\n\nJoin the [**JaNai Discord server**](https://discord.gg/EeFfZUBvxj) to get the latest news, download pre-release and experimental models, get support and ask questions, share your screenshots (use the `s` key in mpv), or share your feedback. 日本語も大丈夫です。\n\n## Usage Instructions\nEnsure your NVIDIA graphics drivers are up to date. Download and extract the [latest release archive](https://github.com/the-database/mpv-upscale-2x_animejanai/releases) of mpv-upscale-2x_animejanai. Open the video player at `mpvnet.exe`.\n\nWhen playing a video for the first time, a TensorRT engine file will be created for the selected ONNX model. Playback will be paused and a command prompt box will open. Please make sure to wait while the engine is created. Engine creation only needs to happen once per model. Playback will resume on its own when finished.\n\nTo confirm upscaling status, press `ctrl+J` to view upscaling stats. This shows the current profile, and the currently running upscaling models if any. \n\nThe player is preconfigured to upscale with 2x_AnimeJaNai models, and makes 3 upscaling profiles available by default. The available profiles are described in more detail below. Any of these profiles can be selected on the fly using the keybinding listed below. \n\n|Profile | Description | Keybinding | Minimum recommended GPU for upscaling 1080p to 4k |\n|-|-|-|-|\n|Quality | Highest quality model | `Shift+1` | RTX 4090|\n|Balanced | High quality model which trades slight quality for major performance gains | `Shift+2` | RTX 3080|\n|Performance | Fastest performance model which sacrifices a bit more quality  | `Shift+3` | RTX 3060|\n\nThe default upscaling profile is the Balanced profile which is recommended for users running an NVIDIA RTX 3080 or higher. \n\n## Customizing Profiles and Other Settings\n\nUpscaling can be further customized using the AnimeJaNaiConfEditor which can be launched by pressing `ctrl+E` from mpvnet. The editor allows the setup of up to 9 custom slots and also the use of custom chains, conditional settings based on video resolution and framerate, downscaling to improve performance, and more. The default upscaling profile can also be set using the conf editor. \n\n![image](https://github.com/the-database/mpv-upscale-2x_animejanai/assets/25811902/76a8db5b-8c67-4b0c-911a-9b02598fb37a)\n\n\nAll other mpv settings can be configured by editing `mpv-upscale-2x_animejanai/portable_config/mpv.conf` (see the [mpv manual](https://mpv.io/manual/stable/) for all options) for mpv options or `mpv-upscale-2x_animejanai/portable_config/input.conf` for mpv keybindings. \n\nBy default, screenshots can be taken with the `s` key and are stored in `mpv-upscale-2x_animejanai/portable_config/screenshots`. \n\n## Setup for AMD or Intel Arc users.\n\nmpv-upscale-2x_animejanai is configured to use TensorRT by default for optimal performance, but TensorRT requires an NVIDIA GPU. Users with AMD or Intel Arc GPUs can use DirectML instead. See the [wiki page](https://github.com/the-database/mpv-upscale-2x_animejanai/wiki/Setup-for-AMD-or-Intel-Arc-users) for detailed instructions. \n\n## 2x_AnimeJaNai Models\nThe 2x_AnimeJaNai models are a collection of real-time 2x Real-ESRGAN Compact, UltraCompact, and SuperUltraCompact models designed specifically for doubling the resolution of HD and SD models. \n\n### 2x_AnimeJaNai HD V3 Models\n\nMost HD anime are [not produced in native 1080p resolution](https://guide.encode.moe/encoding/descaling.html) but rather have a production resolution between 720p and 1080p. When the anime is distributed to consumers via TV broadcast, web streaming, or home video, the video is scaled up to 1080p, leading to scaling artifacts and a loss of image clarity in the source video. The aim of these models is to address these scaling and blur-related issues while upscaling to deliver a result that appears as if the anime was originally mastered in 4K resolution.\n\nThe development of the V3 models spanned over seven months, during which over 100 release candidate models were trained and meticulously refined. The V3 models introduce several notable improvements compared to their V2 counterparts, including:\n- More faithful appearance to original source\n- Improved handling of oversharpening artifacts, ringing, aliasing\n- Better at preserving intentional blur in scenes using depth of field\n- More accurate line colors, darkness, and thickness\n- Better preservation of soft shadow edges\n\nOverall, the V3 models yield significantly more natural and faithful results compared to the V2 models. \n\n### 2x_AnimeJaNai SD V1 Models\n\n2x_AnimeJaNai SD V1 models are in developmnent. The latest release of mpv-upscale-2x_animejanai includes an early beta model for 2x_AnimeJaNai SD V1. While the 2xAnimeJaNai HD models can also work well for some SD sources, those models were specifically trained to upscale HD anime and don't always work well for SD sources. The SD models are designed to upscale SD anime to appear as if the anime was mastered in HD resolution. With sufficient hardware, these models can be stacked with the HD models to upscale SD anime to 4k resolution. \n\n## Benchmarks\n[Benchmarks](https://github.com/the-database/mpv-upscale-2x_animejanai/wiki/Benchmarks) for various hardware configurations tested against various upscaling configurations are available on the wiki. \n\n## Support for Other Media Players\nAny media player which supports external DirectShow filters should be able to run these models, by using [avisynth_filter](https://github.com/CrendKing/avisynth_filter) to get VapourSynth running in the video player. \n\n## Prerendering Videos using Other Graphics Cards\nThe 2x_AnimeJaNai_V2 ONNX models can be used on a PC with any graphics card to render upscaled videos, even when using graphics cards not fast enough for realtime playback. Please see the [AnimeJaNaiConverterGui](https://github.com/the-database/AnimeJaNaiConverterGui) project to create upscaled video files using a Windows GUI. Other options include [chaiNNer](https://github.com/chaiNNer-org/chaiNNer) or [VSGAN-tensorrt-docker](https://github.com/styler00dollar/VSGAN-tensorrt-docker), which are multiplatform options for Windows and non-Windows users.\n\n## Related Projects\n- [MangaJaNai](https://github.com/the-database/mangajanai): Upscale manga with ESRGAN models\n- [VideoJaNai](https://github.com/the-database/VideoJaNai): Windows GUI for upscaling videos with extremely fast performance\n- [traiNNer-redux](https://github.com/the-database/traiNNer-redux): Software for training upscaling models\n\n## Acknowledgements\n- [Upscale Wiki](https://upscale.wiki/wiki/Main_Page) and associated Discord server\n- [422415](https://github.com/422415) for significant assistance in dataset preparation and continuous feedback during development of V2 models\n- Community feedback on V1 models\n- [MPV_lazy](https://github.com/hooke007/MPV_lazy) and [vs-mlrt](https://github.com/AmusementClub/vs-mlrt)\n- [traiNNer-redux](https://github.com/joeyballentine/traiNNer-redux)\n- [Dataset Destroyer](https://github.com/Kim2091/helpful-scripts/tree/main/Dataset%20Destroyer)\n- [Real-ESRGAN](https://github.com/xinntao/Real-ESRGAN)\n- [OpenModelDB](https://openmodeldb.info/)\n- [getnative](https://github.com/Infiziert90/getnative) and [anibin](https://anibin.blogspot.com/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthe-database%2Fmpv-upscale-2x_animejanai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthe-database%2Fmpv-upscale-2x_animejanai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthe-database%2Fmpv-upscale-2x_animejanai/lists"}