mirror of
https://github.com/n00mkrad/flowframes.git
synced 2025-12-16 08:27:44 +01:00
Fix DAIN-NCNN target frame count
This commit is contained in:
@@ -66,11 +66,9 @@ namespace Flowframes.IO
|
||||
|
||||
foreach (string line in File.ReadAllLines(framesFile))
|
||||
{
|
||||
string relTargetPath =
|
||||
line.Remove("file '").Split('\'').FirstOrDefault(); // Relative path in frames file
|
||||
string relTargetPath = line.Remove("file '").Split('\'').FirstOrDefault(); // Relative path in frames file
|
||||
string absTargetPath = Path.Combine(framesFile.GetParentDir(), relTargetPath); // Full path to frame
|
||||
string linkPath = Path.Combine(linksDir,
|
||||
counter.ToString().PadLeft(zPad, '0') + Path.GetExtension(relTargetPath));
|
||||
string linkPath = Path.Combine(linksDir, counter.ToString().PadLeft(zPad, '0') + Path.GetExtension(relTargetPath));
|
||||
pathsLinkTarget.Add(linkPath, absTargetPath);
|
||||
counter++;
|
||||
}
|
||||
|
||||
@@ -154,7 +154,7 @@ namespace Flowframes.Main
|
||||
|
||||
float currentFrameTime = 1 + (step * i);
|
||||
string filename = $"{Paths.interpDir}/{(i + 1).ToString().PadLeft(Padding.interpFrames, '0')}{ext}";
|
||||
string note = $"Frame {currentFrameTime.ToString("0.0000")} {(currentFrameTime.ToString("0.0000").EndsWith("0000") ? $"[Source Frame {frameFiles[(int)currentFrameTime - 1]}]" : "[Interp]")}";
|
||||
string note = $"Frame {currentFrameTime.ToString("0.0000")}";
|
||||
fileContent += $"file '{filename}' # {note}\n";
|
||||
}
|
||||
|
||||
|
||||
@@ -322,7 +322,7 @@ namespace Flowframes.Os
|
||||
Process dain = OsUtils.NewProcess(!OsUtils.ShowHiddenCmd());
|
||||
AiStarted(dain, 1500);
|
||||
SetProgressCheck(outPath, factor);
|
||||
int targetFrames = ((IoUtils.GetAmountOfFiles(lastInPath, false, "*.*") * factor).RoundToInt()) - (factor.RoundToInt() - 1); // TODO: Maybe won't work with fractional factors ??
|
||||
int targetFrames = ((IoUtils.GetAmountOfFiles(lastInPath, false, "*.*") * factor).RoundToInt());
|
||||
|
||||
string args = $" -v -i {framesPath.Wrap()} -o {outPath.Wrap()} -n {targetFrames} -m {mdl.ToLower()}" +
|
||||
$" -t {GetNcnnTilesize(tilesize)} -g {Config.Get(Config.Key.ncnnGpus)} -f {GetNcnnPattern()} -j 2:1:2";
|
||||
|
||||
Reference in New Issue
Block a user