Processing 1,000s of images (Batch Processing)

Topaz Photo AI doesn’t allow more than 1,500 images to be processed at a time which seems to be tied to the physical memory / OS of the device that it runs on. After closing a large batch of images the system often hangs or crashes on Windows 11.
I have to run 9,000 - 15,000 photos at a time through it.
It would be good if there was a template batch processing capability allowing for a 1,000 images to be processed before closing the processed images and then automatically loading the next batch once the memory has cleared.
You could load the first image in each batch for the user to set the autopilot settings for each batch with these autopilot settings being saved and then loaded with the relevant batch.
This approach would then allow me to set batches to run over night when power is cheaper and not have my editing rig tied up during the day.

This is an issue we’re actively working on fixing. It’s not related to the physical memory of the device, but rather an internal limit that may be lifted or entirely moved in an upcoming release.

Thank you for answering this question. Also, I find when processing batches of 1,000 photos that the system randomly skips a file and gives me a duplicate of the previously processed file with the missed file name applied. Is this a known issue?

A post was split to a new topic: Batch Processing Issue with v2.3.0

I have been using the command line interface and a script to process tens of thousands of images. In my case, I was taking a video file and converting it to individual photos for each frame, using Photo AI to enlarge them, then re-assemble them in to a movie.

I had the script working on Windows as a DOS batch file, and macOS as a shell script.

1 Like

Do you have a copy of the Windows Command Line batch file you can post here? Does this work with the 3.0.0 release of Photo AI?

I have not tried it with the current version, but here is the BATCH version I was using to convert frameXXX.jpg files:

@echo off
setlocal enabledelayedexpansion

:: Set the command and output directory as hardcoded variables
set command=“%ProgramFiles%\Topaz Labs LLC\Topaz Photo AI\tpai.exe”
set output_dir=photoai

for /f “delims=” %%a in (‘dir /b /a-d “frame*.jpg”’) do (
set filename=%%a
if not exist !output_dir!!filename! (
echo Processing !filename!
!command! --cli “!filename!” -o !output_dir! -overwrite
) else (
echo Skipping !filename!
)
)

I also had it for macOS shell script:

#!/bin/bash

Set the command and output directory as hardcoded variables

command=“/Applications/Topaz Photo AI.app/Contents/MacOS/Topaz Photo AI”
output_dir=OUTPUT
done_dir=ORGDONE

for file in frame*.jpg; do
# Check if a file with the same name exists in the output directory
if [ ! -f “$output_dir/$file” ]; then
echo “Processing $file”
“$command” --cli “$file” -o “$output_dir” -overwrite
echo “Moving $file to $done_dir…”
mv “$file” “$done_dir/”
else
echo “Skipping $file”
fi
done

echo “All done!”

The latest version allows for the creation of “Presets” which would be useful in using Photo AI from an external batch file.

As it is now, since the 2.4.x release there is a memory leak which prevents one from processing more than a hundred or so images in batch within the application.

Like you, I have been using Photo AI for video frame level processing from either Lightworks or DaVinci Resolve.

Ever since they added Iris to Video AI, I have t been using the frame method with Photo AI. I need to retest.

1 Like