Skip to content

Commit

Permalink
scripts/vsmlrt.py: switch back to rife v1 implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
WolframRhodium committed Apr 11, 2023
1 parent 54850ce commit b4f9a70
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions scripts/vsmlrt.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "3.15.20"
__version__ = "3.15.21"

__all__ = [
"Backend", "BackendV2",
Expand Down Expand Up @@ -845,19 +845,18 @@ def RIFEMerge(
multiple = int(multiple_frac.numerator)
scale = float(Fraction(scale))

# use v2 implementation by default
network_path = os.path.join(
models_path,
"rife_v2",
f"rife_v{model // 10}.{model % 10}{'_ensemble' if ensemble else ''}.onnx"
)
if _implementation != 1 and os.path.exists(network_path) and scale == 1.0:
if _implementation == 2 and os.path.exists(network_path) and scale == 1.0:
implementation_version = 2
multiple = 1 # v2 implements internal padding
clips = [clipa, clipb, mask]
else:
implementation_version = 1
# v2 onnx not found, try v1

network_path = os.path.join(
models_path,
"rife",
Expand Down

0 comments on commit b4f9a70

Please sign in to comment.