Repository navigation
v3.15.0 - RIFE is `rife-v4.25` from TNTwise's 20250112 release by default, padded to 128 with no augmentation, the old `rife-v4.6` kept by name (`SPRITE_GEN_RIFE_MODEL_NAME`), and `sprite-gen rife install` run again
Upgrading from 3.14.0: RIFE is rife-v4.25 by default, so every frame RIFE makes changes, sprite-gen rife install must run again, and the old model is one variable away. The engine runs TNTwise's rife-ncnn-vulkan 20250112 and its rife-v4.25 with no augmentation, each image padded to 128; 3.14.0 ran nihui's 20221029 and rife-v4.6 with -x -z. A cut with no held cell and no repair runs no RIFE and keeps its bytes (tests/video/test_held_fill.py::test_a_cut_with_no_held_cell_runs_no_rife_and_is_the_same_bytes_whichever_model); a cut whose held cells are filled, a repaired walk and a set's alignment get rife-v4.25's frames, and can take more or fewer poses. Run sprite-gen rife install once (an 830 MB zip, 45 MB kept, into a new directory beside the old install). A 20221029 binary on PATH holds no rife-v4.25/ and now reads as RIFE not installed: install, or set SPRITE_GEN_RIFE. SPRITE_GEN_RIFE_MODEL_NAME=rife-v4.6 runs the old model as it ran, its frames 3.14.0's to the byte. A --between-cache keys frames by model, so frames kept by 3.14.0 are not taken. With the torch backend, sprite-gen rife install --backend torch again; an executor and its host must name the same model.
RIFE
- Changed: the default interpolator is rife-v4.25, padded to 128, with no augmentation (
rife.MODEL,rife.MODELS,rife.Model,rife.RELEASE20250112,rife.padded). Practical-RIFE recommends 4.25 "by default for most scenes", and it was measured on five loop cuts, three public (tests/fixtures/rife-cuts) and two private. The binary pads 4.25 to 64 itself; the engine hands it each image padded with zeros to a multiple of 128, as Practical-RIFE pads it at scale 1, and cuts the frame back: on Pip's jump, padded to 64 it took 64 poses from 48 frames, padded to 128 67 from 53, the frames PyTorch takes from the published weights. Known limit: the knight's walk takes 40 poses, two fewer than rife-v4.6's 42; cells 2, 34 and 36 are refused by the binary and by Practical-RIFE's PyTorch alike, and cell 6, which Practical-RIFE's PyTorch takes at t 0.2, is refused by the binary: its frame there has no fault, but made off its time its ghost band reads 0.00602, overalign.RETIME_WINDOW_MAX(0.006), and nearer t 0.4 its frames fail the outline and ghost readings. docs/loop-repair.md. - New:
SPRITE_GEN_RIFE_MODEL_NAMEnames the model (rife.model_name(),rife.held_model()).rife-v4.25(the default) orrife-v4.6.SPRITE_GEN_RIFE_MODELnames the model by its directory, which must be named as its model (the binary reads the version from the name); an unknown name, a directory named otherwise and a name and directory that disagree are each refused.rife.tta()takes the model: rife-v4.6 keeps-x -zandSPRITE_GEN_RIFE_TTA; rife-v4.25 refuses any augmentation (TNTwise's README marks-xand-zdeprecated with it).rife.TTAis gone (rife.MODELS[...].tta). - Changed:
sprite-gen rife installdownloads TNTwise's release 20250112 (rife_install.URL,ZIP_SHA256,ZIP_TOP,SOURCE;zip_name()is<platform>.zip). Each platform's zip SHA-256 is pinned and checked before unpacking, and both models' files againstrife.MODEL_SHA256, now{model: {file: {platform: sha256}}}(the Windows zip'sflownet.paramhas CRLF line ends). It keeps the binary,rife-v4.25/,rife-v4.6/,LICENSEandREADME.md(and the DLLs on Windows); the check frame and the report'smodelare the model the engine runs. Nothing is vendored. - Changed: the torch backend runs rife-v4.25 (
rife_torch.NETS,rife_torch.Net,rife_torch.Head,rife_torch.layers,IFNet(name),state_from_ncnn(files, name)). Practical-RIFE 4.25's IFNet, an encoder on each image and five blocks at scales 16 to 1, written again, its weights read from the release'srife-v4.25files (the publishedflownet.pkl, SHA-2566615790efd627772917205db291f51cd392528a157ecbb2ecaeec3bff8eb6de2, as converted to float16), the betas held apart and the encoder's two copies checked equal. On the CPU it makes Practical-RIFE's own frame from those weights, byte for byte. No pkl mirror: the weights come from the same GitHub zip as the binary. - Changed: reports and identities name the model.
interpolator.modelin reports; the torch runner's and executor's identity carrymodel, so a frame kept for one model is never taken for the other, and a host whose executor answers with another model is refused as the RIFE is made. - Licences:
NOTICEgains TNTwise's rife-ncnn-vulkan (MIT, © 2020 nihui) and Practical-RIFE's 4.25 model (MIT, © 2021 hzwer). - Tests:
tests/video/test_rife_models.py,tests/video/test_rife_cuts.py,tests/video/test_rife_torch_v425.py,tests/fixtures/rife-cuts. The default and the named model, their refusals and pins; the 128 padding (frames a multiple of 128, zeros outside) for rife-v4.25 and rife-v4.6 handed as before; cache keys apart by model; three public cuts (a knight's walk, Pip's run and jump, lossless WebP, their RGBA pinned) filled 24 → 60 fps by the binary (real_rife) and by the torch backend (torch_rife): the knight's walk at least 40 poses, Pip's run and jump within one of 39 and 67, Pip's jump the very frames PyTorch took, and every frame rife-v4.6's feet windows caught dragged 2 px caught for rife-v4.25 too; the rife-v4.25 IFNet's layer order, betas and refusals.tests/video/test_held_fill.pyadds the unheld-bytes test above; Tests that pin the binary's calls pin them by model throughas_pinnedintests/conftest.py(0 calls where the binary is not found, the same asrife_located()false before), which reads a pin as an int, held exactly, or as a pair(floor, top), held from floor to top with both ends allowed, given by model (a dict keyed by model name) or for every model alike: rife-v4.6 the count exactly, as before, and a pair for any model but rife-v4.25 refused (ValueError); rife-v4.25 between a floor and a top, where before it was held only at most the pin, since a reviewer pointed out that a change that skipped interpolation (no calls, or too few) would still pass. The floor is the calls the cut makes when no frame is made again at another fraction, two calls for each frame the cut asks for, each asked once at its own time; the top is the larger of the counts measured on an Apple GPU and on llvmpipe (the CPU Vulkan driver of the Linux lane), because rife-v4.25 runs with no augmentation, in float16, so its frames differ with the GPU's arithmetic, and with them the frames refused and made again at another fraction. The floor counts the frames the cut asks for, not every cell of a held run it sets out to fill: a refused frame with no other fraction left to try ends that run's fill, and on four of the cases the cut then calls the binary fewer times than one frame for each cell would take (the 35 pinned cases were run on both machines, 24 of them reaching the binary; in every case both machines asked for the same number of frames at their own time, so each floor is one number; the counts were the same on both machines except on one synthetic walk, 8 calls on the Apple GPU and 10 on llvmpipe; in 9 of the 24 no frame was made again, so the floor equals the top and the count is held exactly; rife-v4.6's counts were the same on every machine measured); the purpose of the pin is unchanged, each call seconds on a CPU's Vulkan driver, so a change that asks for more calls fails on the count, not on the test's time limit, and now a change that asks for fewer frames fails on the count too. rife-v4.25 asks for more calls on some synthetic cuts and fewer on others, refusing a frame between held cells that shows a neighbour's picture again and making it at another time, or keeping the cells as filmed:tests/video/test_play.py(once-return, 30 to 44 against 36),tests/video/test_ghost_given_way.py(8 to 10 against 8),tests/video/test_ghost_screen.py(8 to 28 against 20),tests/video/test_wrap_blend.py(8 to 24 against 16),tests/video/test_gait_fallback.py(4 to 16 against 22 and 4 to 16 against 14),tests/video/test_explicit_window.py(6 to 20 against 6 and 4 to 16 against 22),tests/video/test_walk_steps.py(ten cases, the least 2 against 6, the most 12 to 30 against 12).tests/release/test_rife_pins.pyholds howas_pinnedreads a pin: rife-v4.25 from its floor to its top (0 calls, and fewer than the floor, fail), rife-v4.6 exactly, a pin not by model exactly for every model, a pair for rife-v4.6 refused, and 0 calls where the binary is not found. The test that the binary and the torch backend judge the walkers alike on one machine, which ran them with the default model, rife-v4.25, and failed on the Linux lane on one pair, bfar50 (the binary on llvmpipe read a cross-fade look over its bound, 0.01645 against 0.015, the torch backend on the CPU 0.01198, the faults the same; on the Apple GPU the binary read 0.0113), now judges each model on the pairs picked for it, listed intests/fixtures/rife-walkers/walkers.jsonunderalike: rife-v4.6, run by name, on its seven, and rife-v4.25 on six picked 2026-11-01 by the same rule from the same ten candidates, near25, far50, mid50, cross50, bnear50 and bfar33 (nine met the rule, near50, far25 and swap50 among them and not added; bfar50 did not, its verdicts differing on llvmpipe with a least margin of 0.097 of the bound; no rife-v4.25 pair checks the cross-fade look, since with rife-v4.25 no candidate reads it clear of its bound, where rife-v4.6's bfar50 still does). The torch backend judging the walkers as the binary did on a machine with no binary stays on rife-v4.6's seven pairs and the binary's recorded rife-v4.6 frames.tests/video/test_loop_overlap.py: rife-v4.25 drags the third walker's hand apart at weight 0.5 (refused as torn), and at 0.7 keeps it whole and reads under the bar (TORN_AT). Tests calibrated on rife-v4.6's augmentation name it.
Install or update:
pip install --upgrade "sprite-gen @ git+https://github.com/aldegad/sprite-gen.git@v3.15.0"The wheel, the source archive and SHA256SUMS are attached. Full notes in CHANGELOG.md.