Add upscayl-bin command line logging to Clone-Image.ps1 for debugging upscaling operations

This commit is contained in:
2026-06-10 17:58:20 -04:00
parent fb4f371450
commit 8addeb0db1
+7 -1
View File
@@ -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 (' 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))) {
$upscaylOutput = & $upscaylExePath -i $SourcePath -o $upscaledTempPath -s $Upscale.ToString() -n $Model -m $modelsDir -g $gpuId 2>&1
$upscaylOutput = & $upscaylExePath @upscaylArgs 2>&1
$upscaylExit = $LASTEXITCODE
if ($upscaylExit -ne 0) {
Write-Host 'upscayl-bin error output:' -ForegroundColor Red