mirror of
https://github.com/n00mkrad/flowframes.git
synced 2025-12-25 12:49:26 +01:00
Adjust code for RIFE 3.9
This commit is contained in:
@@ -5,7 +5,7 @@ namespace Flowframes.Data
|
||||
class Implementations
|
||||
{
|
||||
public static AI rifeCuda = new AI(AI.Backend.Pytorch, "RIFE_CUDA", "RIFE",
|
||||
"CUDA/Pytorch Implementation of RIFE (Nvidia Only!)", "rife-cuda", new int[] { 2, 4, 8, 16 });
|
||||
"CUDA/Pytorch Implementation of RIFE (Nvidia Only!)", "rife-cuda", new int[] { 2, 3, 4, 5, 6, 7, 8, 9, 10 });
|
||||
|
||||
public static AI rifeNcnn = new AI(AI.Backend.Ncnn, "RIFE_NCNN", "RIFE (NCNN)",
|
||||
"Vulkan/NCNN Implementation of RIFE", "rife-ncnn", new int[] { 2, 4, 8 }, true);
|
||||
|
||||
@@ -148,7 +148,7 @@ namespace Flowframes.Os
|
||||
string rbuffer = $"--rbuffer {Config.GetInt(Config.Key.rifeCudaBufferSize, 200)}";
|
||||
//string scale = $"--scale {Config.GetFloat("rifeCudaScale", 1.0f).ToStringDot()}";
|
||||
string prec = Config.GetBool(Config.Key.rifeCudaFp16) ? "--fp16" : "";
|
||||
string args = $" --input {inPath.Wrap()} --output {outDir} --model {mdl} --exp {(int)Math.Log(interpFactor, 2)} {uhdStr} {wthreads} {rbuffer} {prec}";
|
||||
string args = $" --input {inPath.Wrap()} --output {outDir} --model {mdl} --multi {interpFactor} {uhdStr} {wthreads} {rbuffer} {prec}";
|
||||
|
||||
Process rifePy = OsUtils.NewProcess(!OsUtils.ShowHiddenCmd());
|
||||
AiStarted(rifePy, 3500);
|
||||
|
||||
@@ -135,13 +135,14 @@ namespace Flowframes.Ui
|
||||
if (factor > 256)
|
||||
return 256;
|
||||
|
||||
if (ai.aiName == Implementations.rifeCuda.aiName)
|
||||
{
|
||||
if (!IsPowerOfTwo(factor))
|
||||
{
|
||||
return Implementations.rifeCuda.supportedFactors.Last();
|
||||
}
|
||||
}
|
||||
// NO LONGER NEEDED WITH RIFE 3.9
|
||||
//if (ai.aiName == Implementations.rifeCuda.aiName)
|
||||
//{
|
||||
// if (!IsPowerOfTwo(factor))
|
||||
// {
|
||||
// return Implementations.rifeCuda.supportedFactors.Last();
|
||||
// }
|
||||
//}
|
||||
|
||||
return factor;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user