Skip to content

Repository files navigation

English | 日本語 | 中文

Jasna

Jasna is a JAV mosaic restoration tool with a simple GUI, a CLI, a GPU-only processing pipeline, NVIDIA TensorRT and experimental AMD ROCm support, optional secondary restoration models, still-image restoration, and streaming support.

Jasna is free. Supporters get a key that unlocks the extra models trained for this project: the unet-4x secondary upscaler and the experimental SD 1.5 image restoration model. See Supporting the project.

image

Contents

What Jasna Does

  • Restores mosaics in video files.
  • Restores mosaics in still images with the experimental SD 1.5 image model.
  • Detects mosaics with the fast rfdetr-v6 model by default; the larger RF-DETR variant and Lada and ZeLeFans YOLO models are also available.
  • Processes side-by-side VR180 videos per eye and automatically picks the best mosaic restoration handling for each studio; the Segment Editor can preview the options.
  • Supports frame-accurate ranges, restoration previews, and zoom/pan inspection in the Segment Editor.
  • Reduces clip-boundary flicker with temporal overlap and crossfade.
  • Detects hard scene cuts and ends tracked clips at the boundary, so restoration never blends content across a cut.
  • Can further improve quality with optional secondary restoration modelsunet-4x, RTX Super Resolution, or Topaz Video AI — which sharpen restored regions, especially large mosaics, close-ups, and 4K video.
  • Can stream restored video to the built-in browser player or a supported Stash fork.

Community

Join the SLS Discord for examples, support, and settings discussion. Please don't be too weird.

Requirements

  • An NVIDIA GTX 16-series / RTX 20-series or newer GPU. GTX 10-series and older cards (GTX 1050/1060/1070/1080) won't work. Not sure about yours? Check NVIDIA's GPU table — compute capability 7.5+ is required.
  • Nvidia driver 610 or newer on Windows, 580 or newer on Linux.
  • AMD support is experimental and needs a ROCm-supported GPU.
  • Install Jasna into a folder whose path contains only English letters and numbers.

Jasna manages VRAM automatically: when it runs low, waiting frames are temporarily moved to system RAM. No configuration needed.

Quick Start

  1. Download the release package for your OS and GPU vendor.
  2. Unzip it into a folder with only English characters in the path.
  3. Start the app:
    • Windows: double click jasna.exe.
    • Linux NVIDIA: run the jasna file.
    • Linux AMD: run run_jasna_amd.sh.
  4. Add a video or image, choose settings, and start processing.

Every setting in the GUI has a tooltip — hover the ⓘ icon next to it. The GUI guide tours the rest: queue reordering, presets, output patterns, and more.

Prefer the command line?

# Single video
jasna --input input.mp4 --output output.mkv

# Still image
jasna --input photo.png --output restored.png

# Whole folder
jasna --input input_folder --output output_folder

Run jasna --help for all options, or read the CLI reference.

First Run

The first run is slow because Jasna prepares GPU-specific files for your exact card. On NVIDIA this usually takes 15-60 minutes; on AMD the preparation is much shorter. It only happens once — the results are cached in model_weights and reused on every later run. You can copy them from an older Jasna version to a newer one.

Close other applications, including browsers, and avoid using the PC while this runs.

If you run out of VRAM during processing, reduce max clip size first, for example from 180 to 60. See Tuning VRAM and GPU usage.

Learn More

  • Using the GUI — the queue (drag & drop, reordering), presets, output patterns and file conflicts, and other easy-to-miss features.
  • Choosing models — which detection model to pick, sharper results with secondary restoration (unet-4x / RTX Super Resolution / Topaz), and SD 1.5 still-image restoration.
  • Restoring only parts of a video — the Segment Editor, built-in mosaic scanning, suggesting better masks, and the --segments CLI flag.
  • VR180 videos — how Jasna handles side-by-side VR and picks the right settings per studio.
  • Tuning VRAM and GPU usage — clip size, temporal overlap, model compilation, and what to do when VRAM runs out.
  • Advanced processing — denoising, 60→30 FPS export, color LUTs, sharpening, custom encoder settings, and post-export actions.
  • Streaming — watch restored video on the fly in your browser or through Stash.
  • CLI reference — every command-line option, including output templates, encoder settings per codec, and post-export actions.
  • Running from source — developer setup and build notes.

Benchmarks

End-to-end restoration measured on Linux with an RTX 5090 (driver 595.84) and i9-13900K. Jasna used its default models with --max-clip-size 180 --temporal-overlap 15 --secondary-restoration none. Lada Flatpak 0.11.0 used the accurate v2 detector, CUDA FP16, --max-clip-length 180, and its NVIDIA HEVC HQ preset. Frozen-release and Lada times are one measured run after a discarded warmup; v0.9.0 and v0.9.1 times are medians of three interleaved runs after warmup. Parenthetical ratios use Lada as the baseline; because Lada was not run on 8K, that row uses v0.9.0 as its baseline. The SONE clips contain 6,056 frames (3:22) each and the 8K VR clip 900 frames (15 s).

Only the releases where speed or GPU memory actually moved are listed, and one input per resolution. Every version and every codec is in the full benchmark report.

Input Lada 0.11.0 v2 v0.4.1 v0.5.0 v0.9.0 (4a171c9) v0.9.1 (18add8a)
720p H.264 8-bit 01:47 (baseline) 01:35 (1.1x faster) 00:45 (2.4x faster) 00:34 (3.1x faster) 00:32 (3.4x faster)
1080p H.264 8-bit 02:02 (baseline) 01:46 (1.2x faster) 00:47 (2.6x faster) 00:39 (3.2x faster) 00:34 (3.6x faster)
2160p H.264 8-bit 04:56 (baseline) 03:23 (1.5x faster) 01:22 (3.6x faster) 01:15 (3.9x faster) 01:03 (4.7x faster)
8K VR HEVC 8-bit 60 fps 00:34 (8K baseline)

GPU memory is median/peak GiB for the measured benchmark target; means not run. Parenthetical ratios compare the median against v0.4.1, or against v0.9.0 on the 8K row that v0.4.1 never ran. Lada is left out of the comparison: it uses less GPU memory than any Jasna build.

Input Lada v0.4.1 v0.5.0 v0.9.0 v0.9.1
720p H.264 8-bit 1.8/3.1 17.6/19.9 (baseline) 8.6/9.0 (2.0x less) 8.6/9.1 (2.0x less) 4.2/4.6 (4.2x less)
1080p H.264 8-bit 2.0/3.3 18.9/21.4 (baseline) 9.5/10.2 (2.0x less) 9.3/10.1 (2.0x less) 4.8/5.6 (3.9x less)
2160p H.264 8-bit 2.6/4.1 26.0/30.5 (baseline) 12.9/15.0 (2.0x less) 11.4/15.4 (2.3x less) 7.2/10.9 (3.6x less)
8K VR HEVC 8-bit 60 fps 17.1/18.3 (8K baseline)

The v0.9.1 drop in GPU memory comes from building the restoration sub-engines at fixed batch sizes instead of at the clip size — see the engine batch report. For median/peak RAM, methodology, raw data, and performance-commit comparisons see the full benchmark report.

Legacy full-video benchmarks

The original Linux results are retained below and enriched with the new v0.7.2 and v0.9.0 runs. They used the same RTX 5090 and i9-13900K; the listed clip size was preserved for each input.

File Clip (s) Lada 0.10.1 Jasna 0.3.0 Jasna 0.5.0 Jasna 0.6.2 Jasna 0.7.2 Jasna 0.9.0 (7d9cc8c)
ABF-017 (4K, 2h 25min) 60 02:56:26 01:20:49 (2.2x faster) 01:10:00 (2.5x faster) 42:17 (4.2x faster)
HUBLK-063 (1080p, 3h 10min) 180 01:34:51 44:21 (2.1x faster) 37:57 (2.5x faster) 30:58 (3.1x faster) 23:38 (4.0x faster) 18:01 (5.3x faster)
DASS-570_2m 30 01:08 00:30 (2.3x faster) 00:24 (2.8x faster) 00:20 (3.4x faster) 01:05 (1.0x faster) 00:22 (3.1x faster)
NASK-223_Test 30 03:12 01:18 (2.5x faster) 01:02 (3.1x faster) 00:58 (3.3x faster) 01:07 (2.9x faster) 01:01 (3.1x faster)
test-007 30 01:16 00:41 (1.9x faster) 00:28 (2.7x faster) 00:22 (3.5x faster) 00:27 (2.8x faster) 00:27 (2.8x faster)

Supporting the Project

Support pays for training extra models, mainly GPU rental and compute time for larger datasets. Supporters get a key that unlocks:

  • unet-4x secondary upscaler for sharper 256->1024 restoration.
  • SD 1.5 image restoration, the experimental still-image model.

Example results:

How to get a key:

  1. Contribute $15 USD or more in total, across any number of contributions and at any time.
  2. After your contribution is processed, your supporter key is sent automatically:
    • Unifans: sent by platform message. There might be a slight delay.
    • Buy Me a Coffee, including crypto: sent to the email or handle used for the contribution. The key is tied to that email or handle.

Acknowledgments

  • Lada (Codeberg) — Jasna is inspired by, and in some places based on, Lada. The mosaic_restoration_1.2 restoration model used by Jasna was trained by ladaapp, the Lada author.
  • ZeLeFans — for the VR detection model and the in-depth analysis of mosaic shapes and VR projection.

TODO

Current TODO:

  • SeedVR support?
  • Continued performance and VRAM improvements.
  • Better restoration model.
  • Better detection model.

About

JAV video restoration tool

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages