Add upscayl-bin command line logging to Clone-Image.ps1 for debugging upscaling operations
This commit is contained in:
+7
-1
@@ -337,8 +337,14 @@ if ($Upscale -gt 0) {
|
|||||||
Write-Host ('Upscaling source with upscayl-bin (x{0}, model={1}, gpu={2})...' -f $Upscale, $Model, $gpuId)
|
Write-Host ('Upscaling source with upscayl-bin (x{0}, model={1}, gpu={2})...' -f $Upscale, $Model, $gpuId)
|
||||||
Write-Host (' Upscayl temp file: {0}' -f $upscaledTempPath)
|
Write-Host (' Upscayl temp file: {0}' -f $upscaledTempPath)
|
||||||
|
|
||||||
|
$upscaylArgs = @('-i', $SourcePath, '-o', $upscaledTempPath, '-s', $Upscale.ToString(), '-n', $Model, '-m', $modelsDir, '-g', $gpuId)
|
||||||
|
$upscaylCmdLine = '"{0}" {1}' -f $upscaylExePath, (($upscaylArgs | ForEach-Object {
|
||||||
|
if ($_ -match '\s') { '"{0}"' -f $_ } else { $_ }
|
||||||
|
}) -join ' ')
|
||||||
|
Write-Host (' Upscayl command: {0}' -f $upscaylCmdLine)
|
||||||
|
|
||||||
if ($PSCmdlet.ShouldProcess($SourcePath, ('Upscale x{0} with upscayl-bin into temp file' -f $Upscale))) {
|
if ($PSCmdlet.ShouldProcess($SourcePath, ('Upscale x{0} with upscayl-bin into temp file' -f $Upscale))) {
|
||||||
$upscaylOutput = & $upscaylExePath -i $SourcePath -o $upscaledTempPath -s $Upscale.ToString() -n $Model -m $modelsDir -g $gpuId 2>&1
|
$upscaylOutput = & $upscaylExePath @upscaylArgs 2>&1
|
||||||
$upscaylExit = $LASTEXITCODE
|
$upscaylExit = $LASTEXITCODE
|
||||||
if ($upscaylExit -ne 0) {
|
if ($upscaylExit -ne 0) {
|
||||||
Write-Host 'upscayl-bin error output:' -ForegroundColor Red
|
Write-Host 'upscayl-bin error output:' -ForegroundColor Red
|
||||||
|
|||||||
Reference in New Issue
Block a user