Revert to old UHD mode (RIFE CUDA)

This commit is contained in:
N00MKRAD
2021-03-02 22:54:30 +01:00
parent 9ba522f890
commit 504242dca7
6 changed files with 44 additions and 34 deletions

View File

@@ -125,11 +125,12 @@ namespace Flowframes
{
//bool parallel = false;
string outPath = Path.Combine(inPath.GetParentDir(), outDir);
string uhdStr = await InterpolateUtils.UseUHD() ? "--UHD" : "";
string wthreads = $"--wthreads {2 * (int)interpFactor}";
string rbuffer = $"--rbuffer {Config.GetInt("rifeCudaBufferSize", 200)}";
string scale = $"--scale {Config.GetFloat("rifeCudaScale", 1.0f).ToStringDot()}";
//string scale = $"--scale {Config.GetFloat("rifeCudaScale", 1.0f).ToStringDot()}";
string prec = Config.GetBool("rifeCudaFp16") ? "--fp16" : "";
string args = $" --input {inPath.Wrap()} --output {outDir} --model {mdl} --exp {(int)Math.Log(interpFactor, 2)} {scale} {wthreads} {rbuffer} {prec}";
string args = $" --input {inPath.Wrap()} --output {outDir} --model {mdl} --exp {(int)Math.Log(interpFactor, 2)} {uhdStr} {wthreads} {rbuffer} {prec}";
// if (parallel) args = $" --input {inPath.Wrap()} --output {outPath} --model {mdl} --factor {interpFactor}";
// if (parallel) script = "rife-parallel.py";
@@ -138,7 +139,7 @@ namespace Flowframes
SetProgressCheck(Path.Combine(Interpolate.current.tempFolder, outDir), interpFactor);
rifePy.StartInfo.Arguments = $"{OSUtils.GetCmdArg()} cd /D {PkgUtils.GetPkgFolder(Packages.rifeCuda).Wrap()} & " +
$"set CUDA_VISIBLE_DEVICES={Config.Get("torchGpus")} & {Python.GetPyCmd()} {script} {args}";
Logger.Log($"Running RIFE (CUDA)...".TrimWhitespaces(), false);
Logger.Log($"Running RIFE (CUDA){(await InterpolateUtils.UseUHD() ? " (UHD Mode)" : "")}...", false);
Logger.Log("cmd.exe " + rifePy.StartInfo.Arguments, true);
if (!OSUtils.ShowHiddenCmd())