Skip to content

Generate clean 2D game sprites & animation atlases — component-row pipeline: state rows, alpha cleanup, frame extraction, runtime atlases. Codex/Claude skill.

test(rife): rife-v4.25's pinned calls are held from a floor, two calls for each frame a cut asks for at its own time, to the top measured on an Apple GPU and on llvmpipe, so a cut that asks for fewer frames fails as one that asks for more does; as_pinned reads an int exactly and a (floor, top) pair for rife-v4.25 alone, tests/release/test_rife_pins.py holds that reading, and the release notes and docs/release.md say so

Soohong Kimb18e9bb8bce2
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 871f6c5..da7c1db 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -14,7 +14,7 @@ All notable public changes to `sprite-gen` are recorded here. Versions track the
- **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's `rife-v4.25` files (the published `flownet.pkl`, SHA-256 `6615790efd627772917205db291f51cd392528a157ecbb2ecaeec3bff8eb6de2`, 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.model` in reports; the torch runner's and executor's identity carry `model`, 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: `NOTICE` gains 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.py` adds the unheld-bytes test above; Tests that pin the binary's calls pin them by model through `as_pinned` in `tests/conftest.py` (0 calls where the binary is not found, the same as `rife_located()` false before): rife-v4.6 the count exactly, as before; rife-v4.25 at most the pin, the larger of the counts measured on an Apple GPU and on llvmpipe (the CPU Vulkan driver of the Linux lane), because it 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 time (35 pinned cases were run on both machines: on one synthetic walk the binary was called 8 times on the Apple GPU and 10 times on llvmpipe, and on the other 34 cases the counts were the same; 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. 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, 44 against 36), `tests/video/test_ghost_given_way.py` (10 against 8), `tests/video/test_ghost_screen.py` (28 against 20), `tests/video/test_wrap_blend.py` (24 against 16), `tests/video/test_gait_fallback.py` (16 against 22 and 16 against 14), `tests/video/test_explicit_window.py` (20 against 6 and 16 against 22), `tests/video/test_walk_steps.py` (nine cases, from 2 against 6 to 30 against 12). `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.
+- **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.py` adds the unheld-bytes test above; Tests that pin the binary's calls pin them by model through `as_pinned` in `tests/conftest.py` (0 calls where the binary is not found, the same as `rife_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.py` holds how `as_pinned` reads 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. `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.
## v3.14.0 - A walk whose arms swing past its sides is witnessed where its middle rows read a body rising whole, one on a picture swaying once a cycle or slower held named, the body's word one line in both places
diff --git a/docs/release.md b/docs/release.md
index 3627529..315aa86 100644
--- a/docs/release.md
+++ b/docs/release.md
@@ -32,7 +32,7 @@ RIFE 가 닿는 곳이 하나도 없는 상태로 스위트 전체를 돌려 그
시험(`pytest --full -m "real_rife and not torch_rife"`, 아래 torch 단계가 나머지)을 돌린다 — 하나라도 건너뛰거나, 표시된 시험이 없으면 실패다. 그래서 새
실제-RIFE 시험은 표시만 붙이면 `--rife-only` 가 저절로 걷는다.
-컷의 기본 채움(`--fill-held auto`)으로 바이너리에 닿고 CPU 의 Vulkan 드라이버에서 기본 120 s 제한을 넘길 만큼 자주 실행하는 시험은 `real_rife` 표시 여부와 관계없이 긴 바이너리 시험처럼 `@pytest.mark.timeout(900)` 과 바이너리 호출 수 주석을 달고 `tests/conftest.py` 의 `as_pinned` 로 요청하는 RIFE 실행 수를 모델별로 고정한다(바이너리를 못 찾으면 호출 수를 0 으로, 즉 호출이 없는 것으로 고정하며, 이는 이전에 `rife_located()` 가 거짓일 때와 같다). rife-v4.6 은 전처럼 정확한 수로 고정하고, rife-v4.25 는 고정값 이하로 고정하며, 그 고정값은 Apple GPU 와 llvmpipe(Linux 레인의 CPU Vulkan 드라이버)에서 잰 수 가운데 큰 쪽이다. rife-v4.25 를 이하로 두는 까닭은 증강 없이 float16 으로 실행하여 프레임이 GPU 의 연산에 따라 달라지고, 그에 따라 거부되어 다른 때에 다시 만드는 프레임도 달라지기 때문이다. 고정된 35 건을 두 기계에서 실행하여, 합성 걷기 하나에서 바이너리가 Apple GPU 에서는 8 번, llvmpipe 에서는 10 번 호출되었고, 나머지 34 건은 수가 같았으며, rife-v4.6 은 잰 모든 기계에서 수가 같았다. 바이너리를 몇 번만 실행하고 기본 제한 안에서 여유 있게 끝나는 시험은 둘 다 두지 않는다. 고정의 목적은 그대로다. CPU 의 Vulkan 드라이버에서는 실행 하나에 몇 초씩 걸리므로, 실행을 더 요구하는 변경이 시간 초과가 아니라 호출 수에서 걸린다.
+컷의 기본 채움(`--fill-held auto`)으로 바이너리에 닿고 CPU 의 Vulkan 드라이버에서 기본 120 s 제한을 넘길 만큼 자주 실행하는 시험은 `real_rife` 표시 여부와 관계없이 긴 바이너리 시험처럼 `@pytest.mark.timeout(900)` 과 바이너리 호출 수 주석을 달고 `tests/conftest.py` 의 `as_pinned` 로 요청하는 RIFE 실행 수를 모델별로 고정한다(바이너리를 못 찾으면 호출 수를 0 으로, 즉 호출이 없는 것으로 고정하며, 이는 이전에 `rife_located()` 가 거짓일 때와 같다). `as_pinned` 는 고정값을 int 로 받으면 정확한 수로, `(floor, top)` 쌍으로 받으면 양 끝을 포함하여 floor 부터 top 까지로 고정하고, 고정값은 모델 이름을 키로 한 dict 로 모델별로 주거나 모든 모델에 같게 줄 수 있으며, 이 읽기 방식은 `tests/release/test_rife_pins.py` 가 고정한다. rife-v4.6 은 전처럼 정확한 수로 고정하고, rife-v4.25 만 두 끝 사이로 고정하며, 다른 모델에 쌍을 주면 ValueError 로 거부한다. 전에는 rife-v4.25 를 고정값 이하로만 고정했는데, 보간을 건너뛰는 변경(호출이 없거나 너무 적은 경우)도 그대로 통과한다는 검토 지적이 있어 지금은 하한과 상한 사이로 고정한다. 하한은 어느 프레임도 다른 분수에서 다시 만들지 않을 때 컷이 하는 호출 수로, 컷이 요청하는 프레임 하나마다 제때에 한 번씩 요청하는 두 번의 호출이다. 상한은 Apple GPU 와 llvmpipe(Linux 레인의 CPU Vulkan 드라이버)에서 잰 수 가운데 큰 쪽이다. rife-v4.25 를 범위로 두는 까닭은 증강 없이 float16 으로 실행하여 프레임이 GPU 의 연산에 따라 달라지고, 그에 따라 거부되어 다른 분수에서 다시 만드는 프레임도 달라지기 때문이다. 하한은 컷이 요청하는 프레임을 세는 것이지, 채우려고 나선 유지 구간의 모든 셀을 세는 것이 아니다. 다시 시도할 분수가 남지 않은 채 거부된 프레임은 그 구간의 채움을 끝내며, 네 건에서는 그래서 컷이 셀마다 한 프레임씩 만들 때보다 바이너리를 적게 호출한다. 고정된 35 건을 두 기계에서 실행하여 그 중 24 건이 바이너리에 닿았고, 모든 건에서 두 기계가 같은 수의 프레임을 제때에 요청하여 하한은 건마다 하나의 수이며, 합성 걷기 하나에서 바이너리가 Apple GPU 에서는 8 번, llvmpipe 에서는 10 번 호출된 것 외에는 두 기계의 수가 같았고, 24 건 중 9 건은 어느 프레임도 다시 만들지 않아 하한과 상한이 같으므로 정확한 수로 고정되며, rife-v4.6 은 잰 모든 기계에서 수가 같았다. 바이너리를 몇 번만 실행하고 기본 제한 안에서 여유 있게 끝나는 시험은 둘 다 두지 않는다. 고정의 목적은 그대로다. CPU 의 Vulkan 드라이버에서는 실행 하나에 몇 초씩 걸리므로, 실행을 더 요구하는 변경이 시간 초과가 아니라 호출 수에서 걸린다. 지금은 프레임을 더 적게 요청하는 변경도 호출 수에서 걸린다.
RIFE 의 torch 백엔드(`SPRITE_GEN_RIFE_BACKEND=torch`, docs/loop-repair.md 1절)를 돌리는 시험은
`torch_rife` 표시를 단다(`pyproject.toml` 이 등록한다). `tests/conftest.py` 는 PyTorch 가 import 되지
diff --git a/tests/conftest.py b/tests/conftest.py
index 5df0e10..929eeb0 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -249,24 +249,34 @@ def rife_runs(monkeypatch: pytest.MonkeyPatch) -> Callable[[], int]:
return lambda: sum(r.calls for r in located)
-# The models whose count of the binary's calls a test holds as a most, not exactly: rife-v4.25 runs with no augmentation,
-# in float16, so its frames differ with the GPU's arithmetic (an Apple GPU and llvmpipe made different ones), and with them
-# the frames refused and made again at another time. rife-v4.6's counts were the same on every machine measured.
-RUNS_AT_MOST = frozenset({"rife-v4.25"})
+# The models whose count of the binary's calls a test may hold between two ends, not exactly: rife-v4.25 runs with no
+# augmentation, in float16, so its frames differ with the GPU's arithmetic (an Apple GPU and llvmpipe made different ones),
+# and with them the frames refused and made again at another fraction. rife-v4.6's counts were the same on every machine
+# measured, and are held exactly.
+RUNS_BETWEEN = frozenset({"rife-v4.25"})
+Pin = int | tuple[int, int]
-def as_pinned(called: int, pin: int | dict[str, int]) -> bool:
+
+def as_pinned(called: int, pin: Pin | dict[str, Pin]) -> bool:
"""Whether `called`, the binary's calls a test made (`rife_runs()`, `Rife.calls`), keeps the test's pin for the model
- it ran (`rife.model_name()`; an int pins every model alike): none where the binary is not found here; else the pin
- exactly, or at most the pin for a model in `RUNS_AT_MOST`, where it is the most measured on an Apple GPU and on
- llvmpipe."""
+ it ran (`rife.model_name()`; a pin not by model pins every model alike): none where the binary is not found here;
+ else an int exactly, and `(floor, top)` from floor to top, both kept. Only a model in `RUNS_BETWEEN` is held between
+ two ends, any other is refused one (ValueError). The floor is the calls the cut makes where no frame is refused: two
+ for each frame it asks for, each asked once at its own time, the frames a refused run never asked for counted in.
+ The top is the most measured on an Apple GPU and on llvmpipe."""
from sprite_gen.video import rife
if not rife_located():
return called == 0
model = rife.model_name()
- most = pin if isinstance(pin, int) else pin[model]
- return called <= most if model in RUNS_AT_MOST else called == most
+ want = pin[model] if isinstance(pin, dict) else pin
+ if isinstance(want, int):
+ return called == want
+ if model not in RUNS_BETWEEN:
+ raise ValueError(f"{model}'s calls are pinned exactly, not between {want[0]} and {want[1]}")
+ floor, top = want
+ return floor <= called <= top
def pin_id(value: object) -> str | None:
diff --git a/tests/release/test_rife_pins.py b/tests/release/test_rife_pins.py
new file mode 100644
index 0000000..608e8d9
--- /dev/null
+++ b/tests/release/test_rife_pins.py
@@ -0,0 +1,50 @@
+# SPDX-License-Identifier: Apache-2.0
+"""`as_pinned` (tests/conftest.py), how a test that reaches the binary holds its count of the binary's calls: rife-v4.6's
+exactly, rife-v4.25's from its floor, the calls of a cut where no frame is refused, to its top, the most an Apple GPU and
+llvmpipe made. A cut that asks the binary for a frame fewer than its floor, as one whose frame was made without RIFE
+does, fails its pin; so does one that asks for none."""
+import pytest
+
+import conftest
+from conftest import as_pinned
+from sprite_gen.video import rife
+
+PIN = {"rife-v4.25": (16, 24), "rife-v4.6": 16}
+
+
+def runs(monkeypatch):
+ """The binary located here, running the model named."""
+ monkeypatch.setattr(conftest, "rife_located", lambda: True)
+
+ def model(name):
+ monkeypatch.setattr(rife, "model_name", lambda: name)
+
+ return model
+
+
+def test_rife_v4_25_is_held_from_its_floor_to_its_top(runs):
+ runs("rife-v4.25")
+ assert [as_pinned(called, PIN) for called in (0, 14, 16, 20, 24, 26)] == [False, False, True, True, True, False]
+
+
+def test_rife_v4_6_is_held_exactly(runs):
+ runs("rife-v4.6")
+ assert [as_pinned(called, PIN) for called in (14, 16, 18, 24)] == [False, True, False, False]
+
+
+def test_a_pin_not_by_model_holds_every_model_exactly(runs):
+ for model in ("rife-v4.25", "rife-v4.6"):
+ runs(model)
+ assert [as_pinned(called, 20) for called in (18, 20, 22)] == [False, True, False]
+
+
+def test_a_range_for_rife_v4_6_is_refused(runs):
+ runs("rife-v4.6")
+ with pytest.raises(ValueError, match="rife-v4.6's calls are pinned exactly"):
+ as_pinned(16, {"rife-v4.25": (16, 24), "rife-v4.6": (14, 16)})
+
+
+def test_where_no_binary_is_found_none_is_called(monkeypatch):
+ monkeypatch.setattr(conftest, "rife_located", lambda: False)
+ assert [as_pinned(called, PIN) for called in (0, 2, 16)] == [True, False, False]
diff --git a/tests/video/test_explicit_window.py b/tests/video/test_explicit_window.py
index 49bcc60..42c2b03 100644
--- a/tests/video/test_explicit_window.py
+++ b/tests/video/test_explicit_window.py
@@ -65,11 +65,11 @@ ROWS = [
("two-step", _held, ("--state", "walk", *MOTION, "--min-len", "20"), lambda r: r["cycle"]["seam_pop"]["applied"], True, 0),
("counted", _short, ("--state", "walk", *MOTION, "--max-len", "42", "--steps", "1"),
lambda r: r["cycle"]["steps"]["window"] == [41, 42] and r["cycle"]["steps"]["counted_window"] == [41, 43], True,
- {"rife-v4.25": 20, "rife-v4.6": 6}),
+ {"rife-v4.25": (6, 20), "rife-v4.6": 6}),
("counted", _slow, ("--state", "walk", *MOTION, "--min-len", "18", "--steps", "1"), lambda r: r["cycle"]["steps"]["by"] == "given", True, 6),
("fallback", _slow_front, ("--state", "walk", *MOTION, "--max-len", "36"), lambda r: r["gait_fallback"]["window"] == [12, 36], False, 0),
("fallback", _slow_front, ("--state", "walk", *MOTION, "--min-len", "30"), lambda r: r["gait_fallback"]["window"][0] == 30, True,
- {"rife-v4.25": 16, "rife-v4.6": 22}),
+ {"rife-v4.25": (4, 16), "rife-v4.6": 22}),
("one-shot", _hop, ("--state", "jump", "--max-len", "30"), lambda r: r["periodic_attempt"] is not None and r["cycle"]["kind"] == "one-shot", True, 0),
("one-shot", _hop, ("--state", "jump", "--min-len", "30"), lambda r: r["periodic_attempt"] is not None and r["cycle"]["kind"] == "one-shot", True, 0),
("fixed", _hop, ("--state", "jump", "--cycle", "fixed", "--start", "50", "--length", "40", "--max-len", "30"),
diff --git a/tests/video/test_gait_fallback.py b/tests/video/test_gait_fallback.py
index ef9a33e..d06c469 100644
--- a/tests/video/test_gait_fallback.py
+++ b/tests/video/test_gait_fallback.py
@@ -166,7 +166,7 @@ def test_a_cycle_longer_than_half_the_clip_is_found_by_the_fallback(tmp_path, ri
frames = [walker(k, period=40) for k in range(73)]
code, report, output = run(tmp_path, frames)
assert code == 0
- assert as_pinned(rife_runs(), {"rife-v4.25": 16, "rife-v4.6": 22}), rife_runs()
+ assert as_pinned(rife_runs(), {"rife-v4.25": (4, 16), "rife-v4.6": 22}), rife_runs()
assert abs(report['cycle']['length']-40) <= 1
fallback = report['gait_fallback']
assert 'no periodic cycle found' in fallback['reason']
@@ -381,7 +381,7 @@ def test_a_walk_cut_again_by_hand_is_held_at_its_size_and_its_feet(tmp_path, cli
(1 inside) and was refused at 6.83, the 2 % walk 1 px (1) at 3.80."""
frames = [walking_away(k) for k in range(73)] if clip == 'walking away' else [walker(k, grow=-0.02) for k in range(73)]
code, report, output = run(tmp_path, frames, cut=FIXED)
- assert as_pinned(rife_runs(), {"rife-v4.25": 16, "rife-v4.6": 14} if clip == 'shrinking 2 %' else 0), rife_runs()
+ assert as_pinned(rife_runs(), {"rife-v4.25": (4, 16), "rife-v4.6": 14} if clip == 'shrinking 2 %' else 0), rife_runs()
edges = wrap_and_inner(output)
# The feet first, whatever the gate said: held at its size alone, the walk away's last frame stands 6 px above its
# first (1 px a frame inside) and the seam reads 10.03 — its size moved into its place.
diff --git a/tests/video/test_ghost_given_way.py b/tests/video/test_ghost_given_way.py
index dc1b1c9..f9f59ec 100644
--- a/tests/video/test_ghost_given_way.py
+++ b/tests/video/test_ghost_given_way.py
@@ -393,7 +393,7 @@ def test_the_applications_walk_gives_a_small_filmed_ghost_way(tmp_path):
# The binary's calls on the application's walk, by model (`rife.model_name()`): rife-v4.25's frame between held cells 32
# to 34 shows a neighbour's picture again, so it is refused (`held`), tried at another time and kept as filmed.
-APP_RUNS = {"rife-v4.25": 10, "rife-v4.6": 8}
+APP_RUNS = {"rife-v4.25": (8, 10), "rife-v4.6": 8}
@pytest.mark.slow
diff --git a/tests/video/test_ghost_screen.py b/tests/video/test_ghost_screen.py
index fa3f4c1..8bc443f 100644
--- a/tests/video/test_ghost_screen.py
+++ b/tests/video/test_ghost_screen.py
@@ -186,7 +186,7 @@ def test_jump_repair_rejects_a_proposal_that_carries_a_ghost(monkeypatch):
# The binary's calls of this resample, by model (`rife.model_name()`): rife-v4.25's frame made beside the filmed ghost
# carries a ghost of its own, so it is made again at other times and the nearer source frame taken.
-SCREEN_CALLS = {"rife-v4.25": 28, "rife-v4.6": 20}
+SCREEN_CALLS = {"rife-v4.25": (8, 28), "rife-v4.6": 20}
@pytest.mark.slow
diff --git a/tests/video/test_play.py b/tests/video/test_play.py
index 992906a..3a02082 100644
--- a/tests/video/test_play.py
+++ b/tests/video/test_play.py
@@ -260,7 +260,7 @@ def test_a_once_return_that_does_not_come_back_is_refused(tmp_path) -> None:
# The binary's calls the held fill makes on this cut, by model (`rife.model_name()`): rife-v4.25's frame between held cells
# 31 to 33 shows a neighbour's picture again, so it is refused (`held`), tried at the group's other times and kept as filmed.
-ONCE_RETURN_RUNS = {"rife-v4.25": 44, "rife-v4.6": 36}
+ONCE_RETURN_RUNS = {"rife-v4.25": (30, 44), "rife-v4.6": 36}
@pytest.mark.timeout(900) # 36 to 44 calls of the binary at 96 x 96 (the held fill's frames between): seconds on a GPU, minutes on a CPU's Vulkan driver
diff --git a/tests/video/test_walk_steps.py b/tests/video/test_walk_steps.py
index 3732092..5924b7b 100644
--- a/tests/video/test_walk_steps.py
+++ b/tests/video/test_walk_steps.py
@@ -493,8 +493,8 @@ def _unwitnessed(report: dict, interval: float) -> dict:
@pytest.mark.slow
@pytest.mark.timeout(900) # up to 12 calls of the binary at 300 x 220 (the held fill's frames between): seconds on a GPU, minutes on a CPU's Vulkan driver
[email protected]("walker, view, interval, runs", [("behind", None, 17.5, {"rife-v4.25": 10, "rife-v4.6": 12}),
- ("behind", "back_diagonal", 17.5, {"rife-v4.25": 10, "rife-v4.6": 12}),
[email protected]("walker, view, interval, runs", [("behind", None, 17.5, {"rife-v4.25": (8, 10), "rife-v4.6": 12}),
+ ("behind", "back_diagonal", 17.5, {"rife-v4.25": (8, 10), "rife-v4.6": 12}),
("outward", "front_diagonal", 16, 0)], ids=pin_id)
def test_a_walk_whose_feet_meet_once_a_cycle_but_whose_body_does_not_bob_is_cut_two_intervals_with_a_warning(tmp_path, walker, view,
interval, runs, rife_runs):
@@ -560,7 +560,7 @@ def test_a_diagonal_walk_whose_near_foot_steps_out_is_cut_one_cycle_from_its_vie
@pytest.mark.slow
@pytest.mark.timeout(900) # up to 30 calls of the binary at 300 x 220 (the held fill's frames between, both cuts): seconds on a GPU, minutes on a CPU's Vulkan driver
[email protected]("cycle, runs", [(20, {"rife-v4.25": 22, "rife-v4.6": 10}), (24, {"rife-v4.25": 30, "rife-v4.6": 12})],
[email protected]("cycle, runs", [(20, {"rife-v4.25": (10, 22), "rife-v4.6": 10}), (24, {"rife-v4.25": (12, 30), "rife-v4.6": 12})],
ids=pin_id)
def test_a_walk_whose_feet_stay_apart_and_meet_once_a_cycle_is_cut_one_cycle_on_the_order_its_feet_are_drawn_in(tmp_path, cycle, runs, rife_runs):
"""Seen from the front, the feet apart, the foot stepping toward the camera drawn lower: the feet meet on the screen
@@ -733,7 +733,8 @@ def test_a_wide_walk_whose_far_leg_is_drawn_a_few_tones_off_is_cut_two_steps(tmp
@pytest.mark.slow
@pytest.mark.timeout(900) # up to 22 calls of the binary at about 300 x 340 (the held fill's frames between): seconds on a GPU, minutes on a CPU's Vulkan driver
[email protected]("motion, bob, room, runs", [("arc", 3, 0, {"rife-v4.25": 10, "rife-v4.6": 8}), ("arc", 0, 60, 22),
[email protected]("motion, bob, room, runs", [("arc", 3, 0, {"rife-v4.25": (6, 10), "rife-v4.6": 8}),
+ ("arc", 0, 60, {"rife-v4.25": (14, 22), "rife-v4.6": 22}),
("sway", 0, 60, {"rife-v4.25": 2, "rife-v4.6": 6}),
("ramp", 0, 60, {"rife-v4.25": 8, "rife-v4.6": 16})], ids=pin_id)
def test_a_walk_whose_crossings_are_its_steps_carried_up_and_down_is_cut_two_steps(tmp_path, motion, bob, room, runs, rife_runs):
@@ -786,7 +787,7 @@ def test_a_walk_carried_up_and_down_whole_feet_and_all_is_cut_two_intervals_with
@pytest.mark.slow
@pytest.mark.timeout(900) # up to 8 calls of the binary at 300 x 340 (the held fill's frames between): seconds on a GPU, minutes on a CPU's Vulkan driver
[email protected]("bob, runs", [(0, {"rife-v4.25": 4, "rife-v4.6": 8}), (3, {"rife-v4.25": 6, "rife-v4.6": 4})], ids=pin_id)
[email protected]("bob, runs", [(0, {"rife-v4.25": 4, "rife-v4.6": 8}), (3, {"rife-v4.25": (4, 6), "rife-v4.6": 4})], ids=pin_id)
def test_a_walk_on_a_picture_shaken_twice_an_interval_is_cut_two_steps_with_a_warning(tmp_path, bob, runs, rife_runs):
"""The wide walker with its legs drawn alike, its crossings its steps every 23 frames, held still (or rising and
falling on its legs once a step), on a picture shaken 3 px up and down twice an interval — dy = round(3 sin(4 pi k /
diff --git a/tests/video/test_wrap_blend.py b/tests/video/test_wrap_blend.py
index 29afcba..ea9a347 100644
--- a/tests/video/test_wrap_blend.py
+++ b/tests/video/test_wrap_blend.py
@@ -436,7 +436,7 @@ def test_the_checkpoints_part_on_a_flat_figure_is_cut_as_filmed_with_a_warning(t
assert "the wrap blend was not used" in capsys.readouterr().err
cut(tmp_path, keyed(tmp_path, frames, "keyed-off"), "off", wrap_blend="off", repair="off")
assert outputs(tmp_path / "auto") == outputs(tmp_path / "off")
- assert as_pinned(rife_runs(), {"rife-v4.25": 24, "rife-v4.6": 16}), rife_runs()
+ assert as_pinned(rife_runs(), {"rife-v4.25": (8, 24), "rife-v4.6": 16}), rife_runs()
# --- 4. a 1 px line on a flat figure ---------------------------------------------------------------------------------------