Skip to content

Commit

Permalink
Bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
WalkerMx authored Sep 8, 2020
1 parent 5f573f4 commit 2328848
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 13 deletions.
20 changes: 10 additions & 10 deletions AutoCrispy/AutoCrispy/Form1.vb
Original file line number Diff line number Diff line change
Expand Up @@ -86,31 +86,31 @@ Public Class Form1
For Each Folder As String In RootFolders
If File.Exists(Folder & "\waifu2x-caffe-cui.exe") Then
ExeComboBox.Items.Add("Waifu2x Caffe")
CaffePath = Folder & "\waifu2x-caffe-cui.exe"
CaffePath = "\" & Path.GetFileName(Folder) & "\waifu2x-caffe-cui.exe"
End If
If File.Exists(Folder & "\waifu2x-ncnn-vulkan.exe") Then
ExeComboBox.Items.Add("Waifu2x Vulkan")
WaifuNcnnPath = Folder & "\waifu2x-ncnn-vulkan.exe"
WaifuNcnnPath = "\" & Path.GetFileName(Folder) & "\waifu2x-ncnn-vulkan.exe"
End If
If File.Exists(Folder & "\realsr-ncnn-vulkan.exe") Then
ExeComboBox.Items.Add("RealSR Vulkan")
RealSRNcnnPath = Folder & "\realsr-ncnn-vulkan.exe"
RealSRNcnnPath = "\" & Path.GetFileName(Folder) & "\realsr-ncnn-vulkan.exe"
End If
If File.Exists(Folder & "\srmd-ncnn-vulkan.exe") Then
ExeComboBox.Items.Add("SRMD Vulkan")
SRMDNcnnPath = Folder & "\srmd-ncnn-vulkan.exe"
SRMDNcnnPath = "\" & Path.GetFileName(Folder) & "\srmd-ncnn-vulkan.exe"
End If
If File.Exists(Folder & "\waifu2x-converter-cpp.exe") Then
ExeComboBox.Items.Add("Waifu2x CPP")
WaifuCppPath = Folder & "\waifu2x-converter-cpp.exe"
WaifuCppPath = "\" & Path.GetFileName(Folder) & "\waifu2x-converter-cpp.exe"
End If
If File.Exists(Folder & "\Anime4KCPP_CLI.exe") Then
ExeComboBox.Items.Add("Anime4k CPP")
Anime4kPath = Folder & "\Anime4KCPP_CLI.exe"
Anime4kPath = "\" & Path.GetFileName(Folder) & "\Anime4KCPP_CLI.exe"
End If
If File.Exists(Folder & "\python\python.exe") Then
PyDetected = True
DetectedPyPath = Folder & "\python\python.exe"
DetectedPyPath = "\" & Path.GetFileName(Folder) & "\python\python.exe"
End If
Next
If PyDetected = False AndAlso GetPythonPath() <> "" Then
Expand Down Expand Up @@ -468,7 +468,7 @@ Public Class Form1
Dim BuildProcess As ProcessStartInfo
If Model.PackageType = "Python" Then
If PyDetected = True Then
BuildProcess = New ProcessStartInfo(Model.FileLocation, Quote(Model.Package.Script) & " " & MakeCommand(ChainPaths(0), ChainPaths(1), Model.PackageType, Model.Package))
BuildProcess = New ProcessStartInfo(IIf(DetectedPyPath(0) = "\"c, Root & Model.FileLocation, Model.FileLocation), Quote(Model.Package.Script) & " " & MakeCommand(ChainPaths(0), ChainPaths(1), Model.PackageType, Model.Package))
BuildProcess.RedirectStandardOutput = True
BuildProcess.RedirectStandardError = True
BuildProcess.UseShellExecute = False
Expand All @@ -486,8 +486,8 @@ Public Class Form1
Else
For j = 0 To NewImages.Count - 1
Dim NewImage As String = ChainPaths(1) & "\" & Path.GetFileName(NewImages(j))
BuildProcess = New ProcessStartInfo(Model.FileLocation, MakeCommand(NewImages(j), NewImage, Model.PackageType, Model.Package))
BuildProcess.WorkingDirectory = Directory.GetParent(Model.FileLocation).FullName
BuildProcess = New ProcessStartInfo(Root & Model.FileLocation, MakeCommand(NewImages(j), NewImage, Model.PackageType, Model.Package))
BuildProcess.WorkingDirectory = Directory.GetParent(Root & Model.FileLocation).FullName
BuildProcess.RedirectStandardOutput = True
BuildProcess.RedirectStandardError = True
BuildProcess.UseShellExecute = False
Expand Down
8 changes: 7 additions & 1 deletion AutoCrispy/AutoCrispy/FormSettings.vb
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,18 @@
VulkanPak = New VulkanNcnnPackage(Source.VulkanScale.Value, Source.VulkanNoise.Value, Source.VulkanFormat.Text.ToLower, Source.VulkanTAA.Checked)
CppPak = New Waifu2xCppPackage(Source.WaifuCPPMode.Text.ToLower, Source.WaifuCPPScale.Value, Source.WaifuCPPNoise.Value, Source.WaifuCPPFormat.Text.ToLower, Source.WaifuCppGPU.Checked, Source.WaifuCPPOpenCL.Checked)
AnimePak = New Anime4kPackage(Source.AnimeCPPScale.Value, Source.AnimeCppPre.Checked, Source.AnimeCppPost.Checked, Source.AnimeCppPreFilter.Checked, Source.AnimeCppPostFilter.Checked, GetFilters(Source.AnimeCppPreFilters), GetFilters(Source.AnimeCppPostFilters), Source.AnimeCPPGpu.Checked, Source.AnimeCPPCnn.Checked)
PythonPak = New PythonPackage(Source.PyPaths(Source.PyScript.SelectedIndex), Source.PyModels(Source.PyModel.SelectedIndex), Source.PyBatchSize.Value, Source.PyInputFlag.Text.Trim, Source.PyOutputFlag.Text.Trim, Source.PyArguements)
PythonPak = New PythonPackage(GetPyStr(Source.PyPaths, Source.PyScript.SelectedIndex), GetPyStr(Source.PyModels, Source.PyModel.SelectedIndex), Source.PyBatchSize.Value, Source.PyInputFlag.Text.Trim, Source.PyOutputFlag.Text.Trim, Source.PyArguements)
Paths = New ProgramPaths(Source.InputTextBox.Text, Source.OutputTextBox.Text)
BasicSettings = New ProgramSettings(Source.ExeComboBox.SelectedItem, Source.ThreadComboBox.SelectedIndex, Source.NumericThreads.Value, Source.DefringeCheck.Checked, Source.DefringeThresh.Value, Source.TabGroup.SelectedIndex)
ExpertSettings = New AdvancedSettings(Source.DebugCheckbox.Checked, Source.ExpertSettingsBox.Text, Source.CleanupCheckBox.Checked, Source.PortableCheckBox.Checked)
Chain = Source.ChainList
End Sub
Public Function GetPyStr(PyList As List(Of String), Index As Integer) As String
If PyList.Count > 0 Then
Return PyList(Index)
End If
Return ""
End Function
End Structure

<Serializable()> Public Structure ProgramPaths
Expand Down
4 changes: 2 additions & 2 deletions AutoCrispy/AutoCrispy/My Project/AssemblyInfo.vb
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>

<Assembly: AssemblyVersion("1.0.2.2")>
<Assembly: AssemblyFileVersion("1.0.2.2")>
<Assembly: AssemblyVersion("1.0.2.3")>
<Assembly: AssemblyFileVersion("1.0.2.3")>

0 comments on commit 2328848

Please sign in to comment.