mirror of
https://github.com/n00mkrad/flowframes.git
synced 2025-12-24 20:29:26 +01:00
Batch Processing fixes and improvements
This commit is contained in:
@@ -21,7 +21,6 @@ namespace Flowframes.Main
|
||||
|
||||
public static ModelCollection.ModelInfo GetModelByName(AI ai, string modelName)
|
||||
{
|
||||
Logger.Log($"looking for model '{modelName}'");
|
||||
ModelCollection modelCollection = GetModels(ai);
|
||||
|
||||
foreach(ModelCollection.ModelInfo model in modelCollection.models)
|
||||
@@ -32,5 +31,18 @@ namespace Flowframes.Main
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static ModelCollection.ModelInfo GetModelByDir(AI ai, string dirName)
|
||||
{
|
||||
ModelCollection modelCollection = GetModels(ai);
|
||||
|
||||
foreach (ModelCollection.ModelInfo model in modelCollection.models)
|
||||
{
|
||||
if (model.dir == dirName)
|
||||
return model;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,10 +29,18 @@ namespace Flowframes.Main
|
||||
{
|
||||
if (!stopped && Program.batchQueue.Count > 0)
|
||||
{
|
||||
Logger.Log($"[Queue] Running queue task {i + 1}/{initTaskCount}, {Program.batchQueue.Count} tasks left.");
|
||||
await RunEntry(Program.batchQueue.Peek());
|
||||
if (currentBatchForm != null)
|
||||
currentBatchForm.RefreshGui();
|
||||
try
|
||||
{
|
||||
Logger.Log($"[Queue] Running queue task {i + 1}/{initTaskCount}, {Program.batchQueue.Count} tasks left.");
|
||||
await RunEntry(Program.batchQueue.Peek());
|
||||
|
||||
if (currentBatchForm != null)
|
||||
currentBatchForm.RefreshGui();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Logger.Log($"Failed to run batch queue entry. If this happened after force stopping the queue, it's non-critical. {e.Message}", true);
|
||||
}
|
||||
}
|
||||
await Task.Delay(1000);
|
||||
}
|
||||
@@ -55,6 +63,8 @@ namespace Flowframes.Main
|
||||
return;
|
||||
}
|
||||
|
||||
Logger.Log($"ENTRY DET FPS: " + entry.inFpsDetected);
|
||||
|
||||
string fname = Path.GetFileName(entry.inPath);
|
||||
if (IOUtils.IsPathDirectory(entry.inPath)) fname = Path.GetDirectoryName(entry.inPath);
|
||||
Logger.Log($"[Queue] Processing {fname} ({entry.interpFactor}x {entry.ai.aiNameShort}).");
|
||||
|
||||
Reference in New Issue
Block a user