mirror of
https://github.com/n00mkrad/flowframes.git
synced 2025-12-16 16:37:48 +01:00
Avoid error when cancelling chained interp, fixed vfrMode cfg entry, ncnn threads for all
This commit is contained in:
@@ -79,7 +79,7 @@ namespace Flowframes.Forms
|
|||||||
ConfigParser.SaveGuiElement(ffEncThreads);
|
ConfigParser.SaveGuiElement(ffEncThreads);
|
||||||
ConfigParser.SaveGuiElement(ffEncPreset);
|
ConfigParser.SaveGuiElement(ffEncPreset);
|
||||||
ConfigParser.SaveGuiElement(ffprobeCountFrames);
|
ConfigParser.SaveGuiElement(ffprobeCountFrames);
|
||||||
ConfigParser.SaveGuiElement(vfrMode);
|
ConfigParser.SaveComboxIndex(vfrMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LoadSettings()
|
void LoadSettings()
|
||||||
@@ -121,7 +121,7 @@ namespace Flowframes.Forms
|
|||||||
ConfigParser.LoadGuiElement(ffEncThreads);
|
ConfigParser.LoadGuiElement(ffEncThreads);
|
||||||
ConfigParser.LoadGuiElement(ffEncPreset);
|
ConfigParser.LoadGuiElement(ffEncPreset);
|
||||||
ConfigParser.LoadGuiElement(ffprobeCountFrames);
|
ConfigParser.LoadGuiElement(ffprobeCountFrames);
|
||||||
ConfigParser.LoadGuiElement(vfrMode);
|
ConfigParser.LoadComboxIndex(vfrMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void dedupThresh_Leave(object sender, EventArgs e)
|
private void dedupThresh_Leave(object sender, EventArgs e)
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ namespace Flowframes
|
|||||||
string dainDir = Path.Combine(Paths.GetPkgPath(), Path.GetFileNameWithoutExtension(Packages.dainNcnn.fileName));
|
string dainDir = Path.Combine(Paths.GetPkgPath(), Path.GetFileNameWithoutExtension(Packages.dainNcnn.fileName));
|
||||||
Process dain = OSUtils.NewProcess(!OSUtils.ShowHiddenCmd());
|
Process dain = OSUtils.NewProcess(!OSUtils.ShowHiddenCmd());
|
||||||
Init(dain, 1500);
|
Init(dain, 1500);
|
||||||
dain.StartInfo.Arguments = $"{OSUtils.GetCmdArg()} cd /D {dainDir.Wrap()} & dain-ncnn-vulkan.exe {args} -f {InterpolateUtils.lastExt}";
|
dain.StartInfo.Arguments = $"{OSUtils.GetCmdArg()} cd /D {dainDir.Wrap()} & dain-ncnn-vulkan.exe {args} -f {InterpolateUtils.lastExt} -j 4:{Config.Get("ncnnThreads")}:4";
|
||||||
Logger.Log("Running DAIN...", false);
|
Logger.Log("Running DAIN...", false);
|
||||||
Logger.Log("cmd.exe " + dain.StartInfo.Arguments, true);
|
Logger.Log("cmd.exe " + dain.StartInfo.Arguments, true);
|
||||||
if (!OSUtils.ShowHiddenCmd())
|
if (!OSUtils.ShowHiddenCmd())
|
||||||
@@ -81,7 +81,7 @@ namespace Flowframes
|
|||||||
Directory.CreateDirectory(outPath);
|
Directory.CreateDirectory(outPath);
|
||||||
args = $" -v -i {run1ResultsPath.Wrap()} -o {outPath.Wrap()} -t {tilesize} -g {Config.Get("ncnnGpus")}";
|
args = $" -v -i {run1ResultsPath.Wrap()} -o {outPath.Wrap()} -t {tilesize} -g {Config.Get("ncnnGpus")}";
|
||||||
await RunCainPartial(args);
|
await RunCainPartial(args);
|
||||||
Directory.Delete(run1ResultsPath, true);
|
IOUtils.TryDeleteIfExists(run1ResultsPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (times == 8) // #3
|
if (times == 8) // #3
|
||||||
@@ -94,7 +94,7 @@ namespace Flowframes
|
|||||||
Directory.CreateDirectory(outPath);
|
Directory.CreateDirectory(outPath);
|
||||||
args = $" -v -i {run2ResultsPath.Wrap()} -o {outPath.Wrap()} -t {tilesize} -g {Config.Get("ncnnGpus")}";
|
args = $" -v -i {run2ResultsPath.Wrap()} -o {outPath.Wrap()} -t {tilesize} -g {Config.Get("ncnnGpus")}";
|
||||||
await RunCainPartial(args);
|
await RunCainPartial(args);
|
||||||
Directory.Delete(run2ResultsPath, true);
|
IOUtils.TryDeleteIfExists(run2ResultsPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Interpolate.canceled) return;
|
if (Interpolate.canceled) return;
|
||||||
@@ -110,7 +110,7 @@ namespace Flowframes
|
|||||||
string cainExe = "cain-ncnn-vulkan.exe";
|
string cainExe = "cain-ncnn-vulkan.exe";
|
||||||
Process cain = OSUtils.NewProcess(!OSUtils.ShowHiddenCmd());
|
Process cain = OSUtils.NewProcess(!OSUtils.ShowHiddenCmd());
|
||||||
Init(cain, 1500);
|
Init(cain, 1500);
|
||||||
cain.StartInfo.Arguments = $"{OSUtils.GetCmdArg()} cd /D {cainDir.Wrap()} & {cainExe} {args} -f {InterpolateUtils.lastExt}";
|
cain.StartInfo.Arguments = $"{OSUtils.GetCmdArg()} cd /D {cainDir.Wrap()} & {cainExe} {args} -f {InterpolateUtils.lastExt} -j 4:{Config.Get("ncnnThreads")}:4";
|
||||||
Logger.Log("cmd.exe " + cain.StartInfo.Arguments, true);
|
Logger.Log("cmd.exe " + cain.StartInfo.Arguments, true);
|
||||||
if (!OSUtils.ShowHiddenCmd())
|
if (!OSUtils.ShowHiddenCmd())
|
||||||
{
|
{
|
||||||
@@ -201,7 +201,7 @@ namespace Flowframes
|
|||||||
Directory.CreateDirectory(outPath);
|
Directory.CreateDirectory(outPath);
|
||||||
args = $" -v -i {run1ResultsPath.Wrap()} -o {outPath.Wrap()} -t {tilesize} -g {Config.Get("ncnnGpus")} -f {InterpolateUtils.lastExt} -j 4:{Config.Get("ncnnThreads")}:4";
|
args = $" -v -i {run1ResultsPath.Wrap()} -o {outPath.Wrap()} -t {tilesize} -g {Config.Get("ncnnGpus")} -f {InterpolateUtils.lastExt} -j 4:{Config.Get("ncnnThreads")}:4";
|
||||||
await RunRifePartial(args);
|
await RunRifePartial(args);
|
||||||
Directory.Delete(run1ResultsPath, true);
|
IOUtils.TryDeleteIfExists(run1ResultsPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (times == 8) // #3
|
if (times == 8) // #3
|
||||||
@@ -214,7 +214,7 @@ namespace Flowframes
|
|||||||
Directory.CreateDirectory(outPath);
|
Directory.CreateDirectory(outPath);
|
||||||
args = $" -v -i {run2ResultsPath.Wrap()} -o {outPath.Wrap()} -t {tilesize} -g {Config.Get("ncnnGpus")} -f {InterpolateUtils.lastExt} -j 4:{Config.Get("ncnnThreads")}:4";
|
args = $" -v -i {run2ResultsPath.Wrap()} -o {outPath.Wrap()} -t {tilesize} -g {Config.Get("ncnnGpus")} -f {InterpolateUtils.lastExt} -j 4:{Config.Get("ncnnThreads")}:4";
|
||||||
await RunRifePartial(args);
|
await RunRifePartial(args);
|
||||||
Directory.Delete(run2ResultsPath, true);
|
IOUtils.TryDeleteIfExists(run2ResultsPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Interpolate.canceled) return;
|
if (Interpolate.canceled) return;
|
||||||
|
|||||||
Reference in New Issue
Block a user