From 8addeb0db153e5dc139e6b878cd65d6751c56266 Mon Sep 17 00:00:00 2001 From: Claude Toupin Date: Wed, 10 Jun 2026 17:58:20 -0400 Subject: [PATCH] Add upscayl-bin command line logging to Clone-Image.ps1 for debugging upscaling operations --- Clone-Image.ps1 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Clone-Image.ps1 b/Clone-Image.ps1 index e323934..9f8608d 100644 --- a/Clone-Image.ps1 +++ b/Clone-Image.ps1 @@ -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