mirror of
https://github.com/n00mkrad/flowframes.git
synced 2025-12-23 19:59:31 +01:00
Removed NCNN RIFE 2.0 model dir workaround, no longer needed
This commit is contained in:
@@ -310,9 +310,6 @@ namespace Flowframes
|
||||
string uhdStr = await InterpolateUtils.UseUhd() ? "-u" : "";
|
||||
string ttaStr = Config.GetBool("rifeNcnnUseTta", false) ? "-x" : "";
|
||||
|
||||
string oldMdlName = mdl;
|
||||
mdl = RifeNcnn2Workaround(mdl); // TODO: REMOVE ONCE NIHUI HAS GOTTEN RID OF THE SHITTY HARDCODED VERSION CHECK
|
||||
|
||||
rifeNcnn.StartInfo.Arguments = $"{OSUtils.GetCmdArg()} cd /D {Path.Combine(Paths.GetPkgPath(), Networks.rifeNcnn.pkgDir).Wrap()} & rife-ncnn-vulkan.exe " +
|
||||
$" -v -i {inPath.Wrap()} -o {outPath.Wrap()} -m {mdl.ToLower()} {ttaStr} {uhdStr} -g {Config.Get("ncnnGpus")} -f {GetNcnnPattern()} -j {GetNcnnThreads()}";
|
||||
|
||||
@@ -333,7 +330,6 @@ namespace Flowframes
|
||||
}
|
||||
|
||||
while (!rifeNcnn.HasExited) await Task.Delay(1);
|
||||
RifeNcnn2Workaround(oldMdlName, true);
|
||||
}
|
||||
|
||||
public static async Task RunDainNcnn(string framesPath, string outPath, float factor, string mdl, int tilesize)
|
||||
@@ -522,27 +518,5 @@ namespace Flowframes
|
||||
|
||||
return $"4:{progThreadsStr}:4"; ;
|
||||
}
|
||||
|
||||
static string RifeNcnn2Workaround (string modelName, bool reset = false)
|
||||
{
|
||||
if (!modelName.StartsWith("RIFE2")) return modelName;
|
||||
string validMdlName = "rife-v2";
|
||||
string rifeFolderPath = Path.Combine(Paths.GetPkgPath(), Networks.rifeNcnn.pkgDir);
|
||||
string modelFolderPath = Path.Combine(rifeFolderPath, modelName);
|
||||
string fixedModelFolderPath = Path.Combine(rifeFolderPath, validMdlName);
|
||||
|
||||
if (!reset)
|
||||
{
|
||||
IOUtils.TryDeleteIfExists(fixedModelFolderPath);
|
||||
Directory.Move(modelFolderPath, fixedModelFolderPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
IOUtils.TryDeleteIfExists(modelFolderPath);
|
||||
Directory.Move(fixedModelFolderPath, modelFolderPath);
|
||||
}
|
||||
|
||||
return validMdlName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user