mirror of
https://github.com/n00mkrad/flowframes.git
synced 2026-07-10 04:21:49 +02:00
Fixed issues with custom output path and batch processing
This commit is contained in:
@@ -194,9 +194,8 @@ namespace Flowframes
|
||||
public void LoadBatchEntry(InterpSettings entry)
|
||||
{
|
||||
inputTbox.Text = entry.inPath;
|
||||
outputTbox.Text = entry.outPath;
|
||||
MainUiFunctions.SetOutPath(inputTbox, entry.outPath);
|
||||
interpFactorCombox.Text = entry.interpFactor.ToString();
|
||||
//aiCombox.SelectedIndex = Implementations.networks.IndexOf(entry.ai);
|
||||
aiCombox.SelectedIndex = Implementations.networks.IndexOf(Implementations.networks.Where(x => x.aiName == entry.ai.aiName).FirstOrDefault());
|
||||
SetOutMode(entry.outMode);
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ namespace Flowframes.Main
|
||||
return false;
|
||||
}
|
||||
|
||||
if (entry.outPath == null || !Directory.Exists(entry.outPath))
|
||||
if (entry.outPath == null || (!Directory.Exists(entry.outPath) && Config.GetInt("outFolderLoc") != 1))
|
||||
{
|
||||
Logger.Log("Queue: Can't process queue entry: Output path is invalid.");
|
||||
return false;
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace Flowframes.Ui
|
||||
if (Config.GetBool(Config.Key.clearLogOnInput))
|
||||
Logger.ClearLogBox();
|
||||
|
||||
outputTbox.Text = (Config.GetInt("outFolderLoc") == 0) ? inputTbox.Text.Trim().GetParentDir() : Config.Get("custOutDir").Trim();
|
||||
SetOutPath(inputTbox, inputTbox.Text.Trim().GetParentDir());
|
||||
|
||||
Program.lastInputPath = path;
|
||||
Program.lastInputPathIsSsd = OsUtils.DriveIsSSD(path);
|
||||
@@ -66,6 +66,28 @@ namespace Flowframes.Ui
|
||||
|
||||
}
|
||||
|
||||
public static bool SetOutPath (TextBox outputTbox, string outPath)
|
||||
{
|
||||
bool customOutDir = Config.GetInt("outFolderLoc") == 1;
|
||||
outputTbox.Text = customOutDir ? Config.Get("custOutDir").Trim() : outPath;
|
||||
|
||||
if (customOutDir)
|
||||
{
|
||||
try
|
||||
{
|
||||
Directory.CreateDirectory(outputTbox.Text);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Logger.Log($"Failed to create output folder: {e.Message}");
|
||||
outputTbox.Text = outPath;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static void CheckExistingFolder (string inpath, string outpath)
|
||||
{
|
||||
if (Interpolate.current == null || !Interpolate.current.stepByStep) return;
|
||||
|
||||
@@ -76,7 +76,7 @@ try:
|
||||
print("Using >= 3.9 model.")
|
||||
|
||||
model.load_model(os.path.join(dname, args.model), -1)
|
||||
print("Loaded v3.x HD model.")
|
||||
print("Loaded v3.x/4.x model.")
|
||||
except:
|
||||
try:
|
||||
print(f"Trying to load v3 (legacy) model from {os.path.join(dname, args.model)}")
|
||||
|
||||
Reference in New Issue
Block a user