Change NCNN_GPU_ID=-1 handling in Clone-Image.ps1 to omit upscayl-bin -g flag instead of passing -1 (which the tested build rejects), update documentation across Clone-Image.md, SKILL.md, README.md and index.md to clarify -1 means CPU for rife-ncnn-vulkan but default device for upscayl-bin, wrap Get-SrtContent calls in Create-FullSubtitle.ps1 with @() array operator to ensure Count property exists when parsing returns single entry, fix Get-FramesRange.ps1 output directory resolution to use Resolve-Path before

This commit is contained in:
guru committed 2026-11-02 19:36:49 -05:00
1 parent de238fb9c3
commit fcc208e351
7 files changed
+13 -12

No files matched your search

+4 -3
View File
@@ -33,7 +33,7 @@
ffmpeg input, so any -Size / -LTX cover-scale-then-crop is applied to the upscaled image.
Requires upscayl-bin.exe in PATH, the UPSCAYL_HOME environment variable pointing to the
upscayl-bin install directory, and the NCNN_GPU_ID environment variable set to the desired
GPU device ID (-1 for CPU, 0/1/2/... for GPU).
GPU device ID (0/1/2/... for a GPU, or -1 to omit the -g flag so upscayl-bin uses its default device).
.PARAMETER Model
Upscayl model name (without extension) to use when -Upscale is specified. Defaults to
'4xNomos8kSC'. The model files (<Model>.bin and <Model>.param) must exist under
@@ -328,7 +328,7 @@ if ($Upscale -gt 0) {
exit 1
}
if ($gpuId -notmatch '^-?\d+$') {
Write-Error ('NCNN_GPU_ID must be an integer (-1 for CPU, 0+ for GPU). Current value: {0}' -f $gpuId)
Write-Error ('NCNN_GPU_ID must be an integer (-1 for the default device, 0+ for a GPU index). Current value: {0}' -f $gpuId)
exit 1
}
@@ -337,7 +337,8 @@ 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)
$upscaylArgs = @('-i', $SourcePath, '-o', $upscaledTempPath, '-s', $Upscale.ToString(), '-n', $Model, '-m', $modelsDir)
if ([int]$gpuId -ge 0) { $upscaylArgs += @('-g', $gpuId) }
$upscaylCmdLine = '"{0}" {1}' -f $upscaylExePath, (($upscaylArgs | ForEach-Object {
if ($_ -match '\s') { '"{0}"' -f $_ } else { $_ }
}) -join ' ')