script to update paths and models
Love your workflows, but don't like having to browse to where my safetensors files are compared to yours, like "LTX23_audio_vae_bf16_KJ.safetensors" is really "LTX23_audio_vae_bf16.safetensors" to everyone else in the world, so rather than bother you with a trivial request to update your workflow, I just created a powershell script for to fix all of them and customize them to the models I want to use.
It's written for Windows users and replaces the paths to where yours are on your machine. It saves the old version to your recycle bin so you can always recover it if you don't like the change it made.
- Update the rootpath to where your *.json files are
- the $replacements has the search term on left and replacement on the right so you can add more
- save this is fixPaths.ps1 and run it or paste into a powershell window and run.
# Root directory with your workflows
$rootPath = "C:\Data\LTX-2.3-Workflows"
# Exact string replacements
$replacements = [ordered]@{
# Transformer (dev)
"LTXVideo\v2\ltx-2.3-22b-dev_transformer_only_fp8_scaled.safetensors" = "ltx-2-3-22b-dev_transformer_only_fp8_input_scaled.safetensors"
"LTXVideo\\v2\\ltx-2.3-22b-dev_transformer_only_fp8_scaled.safetensors" = "ltx-2-3-22b-dev_transformer_only_fp8_input_scaled.safetensors"
# LoRA (path cleanup)
"LTX\LTX-2\ltx-2.3-22b-distilled-lora-384.safetensors" = "ltx-2.3-22b-distilled-lora-384.safetensors"
"LTX\\LTX-2\\ltx-2.3-22b-distilled-lora-384.safetensors" = "ltx-2.3-22b-distilled-lora-384.safetensors"
# Spatial upscaler
"ltx-2.3-spatial-upscaler-x2-1.0.safetensors" = "ltx-2.3-spatial-upscaler-x2-1.1.safetensors"
# Distilled transformer
"LTXVideo\v2\ltx-2.3-22b-distilled_transformer_only_fp8_scaled.safetensors" = "ltx-2.3-22b-distilled_transformer_only_fp8_input_scaled_v3.safetensors"
"LTXVideo\\v2\\ltx-2.3-22b-distilled_transformer_only_fp8_scaled.safetensors" = "ltx-2.3-22b-distilled_transformer_only_fp8_input_scaled_v3.safetensors"
# VAE cleanup - on my system it wouldn't pick it up in vae_approx so I personally have these uncommented
"vae_approx\taeltx2_3.safetensors" = "taeltx2_3.safetensors"
"vae_approx\\taeltx2_3.safetensors" = "taeltx2_3.safetensors"
# Gemma
"gemma_3_12B_it_fpmixed.safetensors" = "gemma_3_12B_it_fp8_scaled.safetensors"
# Additional VAE replacements
"LTX23_audio_vae_bf16_KJ.safetensors" = "LTX23_audio_vae_bf16.safetensors"
"LTX23_video_vae_bf16_KJ.safetensors" = "LTX23_video_vae_bf16.safetensors"
}
Add-Type -AssemblyName Microsoft.VisualBasic
function Get-LiteralMatchCount {
param (
[string]$Text,
[string]$Search
)
if ([string]::IsNullOrEmpty($Search)) {
return 0
}
$count = 0
$startIndex = 0
while ($true) {
$index = $Text.IndexOf($Search, $startIndex, [System.StringComparison]::Ordinal)
if ($index -lt 0) {
break
}
$count += 1
$startIndex = $index + $Search.Length
}
return $count
}
$files = Get-ChildItem -Path $rootPath -Recurse -Filter *.json -File
foreach ($file in $files) {
$content = Get-Content -Path $file.FullName -Raw -Encoding UTF8
$originalContent = $content
$changed = $false
foreach ($oldValue in $replacements.Keys) {
$newValue = $replacements[$oldValue]
$count = Get-LiteralMatchCount -Text $content -Search $oldValue
if ($count -gt 0) {
$content = $content.Replace($oldValue, $newValue)
Write-Host "[$($file.Name)] Replaced $count occurrence(s):"
Write-Host " OLD: $oldValue"
Write-Host " NEW: $newValue"
$changed = $true
}
}
if ($changed -and $content -ne $originalContent) {
try {
# Send original file to Recycle Bin
[Microsoft.VisualBasic.FileIO.FileSystem]::DeleteFile(
$file.FullName,
[Microsoft.VisualBasic.FileIO.UIOption]::OnlyErrorDialogs,
[Microsoft.VisualBasic.FileIO.RecycleOption]::SendToRecycleBin
)
# Write updated content back to original path
Set-Content -Path $file.FullName -Value $content -Encoding UTF8
Write-Host "Updated: $($file.FullName)"
Write-Host ""
}
catch {
Write-Host "ERROR updating: $($file.FullName)"
Write-Host " $($_.Exception.Message)"
Write-Host ""
}
}
}
Write-Host "Done."
Yes, when there was a lot of variants out at the beginning, I tested which ones worked with the workflow and which ones not... i case someone asked.
_KJ simply means its from Kijai's repro
I'll remove that for future workflows ;-)
but yes, I also have folder organized within since I also have a lot of Wan, and other models.. so its a nice useful script for sure ;-)
Will try use that. At least for those that download without any extra folder organization, it will make the models be at the "right place" ;-)
This is awesome!
I did still get this:
LTXvideo\LTX-2\quantstack\LTX-2.3-distilled-Q4_K_S.gguf
in LTX-2.3_-_I2V_T2V_Dev_Full-Steps.json but improved a lot!