Here are the scripts for anyone wanting to download all models for offline usage. To use them open the terminal from inside the app and run the script. Using a terminal opened from outside the app will not work. Feel free to modify the scripts depending on the models and input resolutions you need. Feel free to ask any questions below.
Hello @suraj , when will we really be entitled to a model manager like in version 2.6.4? You do not provide any answer to this question which is asked by several people among us here that they ask for a return from the model manager so that we can choose our own models that we want and to include the old models artemis, gaia, etc. Thank you for providing us with a clear and clear answer on this question.
I currently do not have a timeline for Model Manager. On the GUI side the focus is first to improve preview experience and then add support for frame numbers.
Itās not put any model files (.tz files) in the C:\ProgramData\Topaz Labs LLC\Topaz Video AI\models folder that I can see (thereās none showing with a last modified date of todayās date).
I also ran it yesterday and there was none showing with current date yesterday. I know there was still models to download because I tried a test of video ai, which said it failed on a model and then I downloaded one that it said it failed on manually. edit: and Iāve run another test of Video AI today and that tries to download a new model too (so thereās still model files needed to download).
Is there a reason why it uses ffmpeg instead of something that just copies (maybe ftp based or http based)? eg. is there a common ftp copy or http copy command that would work better (while still being fast)?
Also couldnāt it specify more clearly what itās doing? eg. if itās downloading a file couldnāt it say what file itās downloading (eg. the name of the ai model and the tile size.tz) and where itās saving it? Or if itās skipping one if it already exists couldnāt do that?
Itās not clear what itās done from the current output really - ie. what files itās saved, if any. What files itās skipped because they already exist with up to date versions.
edit: When I was sent it I wasnāt given the instruction thatās shown at the top of this thread which is to "To use them open the terminal from inside the app and run the script. So Iām trying that now. Itās pausing for a while on one line so maybe itās doing something more. Previously Iād run it from a normal command prompt in the topaz program folder. It would still be more helpful if it said what (if any file itās downloading though and what itās skipping.
edit: itās downloaded one model file now thanks (aaa-v10-fnet-fp16-576x416-2x-ov.tz) but it would be good if it showed more info about what itās downloading so we can see what itās downloading (and maybe the bitrate, % complete, filesize). edit: and itās downloaded some other model files too.
This should be fixed by the time of 3.2 release
Currently the scripts just use the existing FFmpeg implementation to download the models. Will add some downloading messages.
I would suggest:
At the end of ffmpeg.exe line (-f null -) put the space and the text 2>nul
after line 6 (for %%s in (1, 2, 4) do () put the line echo %%~i %%~m %%~s
I agree 100%! While I havenāt tried running anything from the command line, last night I loaded a video into Video AI, adjusted my settings, and selected preview. It goes back and forth between downloading model and loading model, but if the app had an indicator bar showing that it was actually downloading a model and when the indicator bar is full, the model has been fully downloaded, it would be extremely helpful. It would also be helpful for troubleshooting purposes. As I mentioned, I tried to upscale a video last night, but it was taking so long to download, I just left it as is and went to bed. This morning it was still saying the same thing, so Iām not sure if itās having difficulties downloading the models, loading the models, or something else.
You mentioned looking into the models folder in the Topaz Labs LLC/Topaz Video AI folder for a models folder, but after upgrading to v3.2.3 Iāve been unable to upscale any videos and a models folder doesnāt exist within the Topaz Video AI folder.
Iāve been using Topaz products for many years and never had any problems with anything, but starting a couple versions ago I couldnāt render videos using my Nvidia 3080 Ti and now I canāt render videos at all. I was trying to upscale a movie, but just to test it out I loaded a 1MB 320x240 avi video to upscale and the software gets stuck saying downloading model/loading model again. Not sure whatās been going on at Topaz, but the last 3 releases, including v3.2.3, donāt work at all. Prior to this, Iāve never had any issues going all the way back to Topaz Video Enhance AI
In Video AI if you go to File->Preferences->Directories it will show you what your models folder is set to (mineās set to C:\ProgramData\Topaz Labs LLC\Topaz Video AI\models).
You could try using the download script thatās at the top of this thread. I havenāt downloaded the very latest version of it yet. But I found the script only seemed to work when I went in Topaz Video AI to process->open command prompt and started it from there (when I just used a normal command prompt from windows to start it it didnāt seem to work but I may be mistaken). But the download script can take hours/all day downloading a lot of model files for models that you may not need/want (I donāt know if it downloads it for other processors/GPUs and not just those relevant to the ones you have). So generally I use the method of looking in the Video AI log file for the files that it failed on (that have the failed message on) and downloading those in a web browser and saving them to the models folder. Also when I upgrade to a new version I make a backup copy of the models folder and choose the option not to remove the old models (as many of them may not have a newer version and removing them would just mean it would try to redownload them again).
I never have any downloading issues for models I have used before, and when updating to the latest version of TVAI, I always choose not to delete anything so whatever I have will stay in the models folder. I also ensure that I am offline before starting any process that I am in a hurry to complete.
TVAI probably tries to check for an updated model but as it canāt do that, it just uses whatever is already in the models folder. If the model it needs isnāt there, obviously the process will fail and i have to go online for TVAI to get it, but thatās not often as I tend to use a fairly limited set of models so it isnāt a problem for me.
I downloaded the script, made sure all the models were in the folder, and made sure the correct folder was set in Preferences, but now Iām receiving an AI error whenever I try rendering a video. I just submitted a bug along with all of my log files. Itās crazy how dependent Iāve become to TVAI!
#!/bin/bash
# Set resolutions
RESOLUTIONS=("480x360" "640x480" "720x480" "768x576" "1280x720" "1920x1080" "3840x2160")
# Set upscaling scales
SCALES=("1" "2" "4")
# Set models
MODELS=("aaa-10" "ahq-12" "alq-13" "alqs-2" "amq-13" "amqs-2" "ddv-3" "dtd-4" "dtds-2" "dtv-4" "dtvs-2" "gcg-5" "ghq-5" "prob-3" "thd-3" "thf-4" "thm-2" "ifi-1" "chf-3" "chr-2" "apo-8" "apf-1")
# Set device
DEVICE=-2
# Loop through models and resolutions
for m in "${MODELS[@]}"
do
for r in "${RESOLUTIONS[@]}"
do
if [[ $m =~ ^if[a-z]{2}-[0-9]$ || $m =~ ^(ch|ap)[rf]-[0-9]$ ]]
then
# If it's an interpolation or deblurring model, use different TVAI command
TVAI_CMD="ffmpeg -nostats -hide_banner -f lavfi -i color=c=red@0.8:duration=0.01:rate=100:size=$r -vf tvai_fi=model=$m:device=$DEVICE:vram=1:instances=0 -f null -"
else
# Otherwise, use the upscaling command with all scales
for s in "${SCALES[@]}"
do
TVAI_CMD="ffmpeg -nostats -hide_banner -f lavfi -i color=c=red@0.8:duration=0.01:rate=100:size=$r -vf tvai_up=model=$m:scale=$s:device=$DEVICE:vram=1:instances=0 -f null -"
echo "Trying command: $TVAI_CMD"
eval $TVAI_CMD
# Check if the command failed and download model if it did
if [ $? -ne 0 ]
then
wget -O /root/.config/Topaz\ Labs\ LLC/Topaz\ Video\ Enhance\ AI/models/$m.pth https://cdn.topazlabs.com/resources/models/$m.pth --no-check-certificate
fi
done
fi
done
done
If anyone can do better or has a suggestion please share.
Last night I tried downloading models using this script (Iām on Windows) and on the first attempt my video cardās drivers crashed after a while. So I deleted content of models folder and tried again but I am not confident it downloaded everything.
Can somebody help me, please, and let me know if you right click on models folder that has all of them downloaded and click on āPropertiesā what does it say how many files that folder has and what is its size in bytes?
P.S. In the absence of better model management tool it would be very nice of Topaz Labs if they could provide list of all model files for each release along with their size and hash info. That way there would be less question marks is something missing after the download and did any corruptions occur during the download.
I run Topaz Video AI and select a video and select the things I want done using the AI models I specify (such as changing the scale with a particular model or increasing the frame rate with one etc.). If it fails (eg. waits for ages on one or more or gives the error message about it) I open the log folder (help->logging->open log folder) then exit the app so that I can open any log file (since it might prevent you if the app has the one you want open) and open the last log file (that has āmainā in the filename) in notepad.
In notepad I then do a search for āfailedā. If it finds one it should say the URLs of the files that it failed on (if it finds multiple ones you could enter a search that just gets the first failure of each).
eg. I just ran it and this was one of the things in the log file: ...Thread: 24764 Critical Attempt 0 failed for https://veai-models.topazlabs.com /thf-v4-gnet-fp16-576x672-1x-ox.tz
So searching for ā0 failedā would find all the failed first attempts to find a particular model file of a particular tile size.
So I can copy the "https://veai-models.topazlabs.com /thf-v4-gnet-fp16-576x672-1x-ox.tz" part and paste it into the URL bar of my browser (eg. Firefox) then remove the space after ā.comā then press return and it should then download that file. It asks me where to place it (that might be a preference you need to set up in the browser) and I select to save it in the topaz AI models folder (C:\ProgramData\Topaz Labs LLC\Topaz Video AI\models). So you can do the same thing for the first failed attempt for all the other failed to download files in that log file. Those errors should be in one of the log files that have āmainā in their filename.
It might sometimes show a model file failed in the log file when it doesnāt show a āfailedā message in the app (if it failed on one or more tile sizes but then loaded a different tile size okay) so you could just check the log file if it spent a long time saying ādownloadingā but didnāt eventually say it failed in the app - just to see if it had failed on some tile sizes (in which case you could download those manually).
Thank you for your prompt and thorough reply. Unfortunately I have ffmpeg crashes whenever I try to run the script and nothing shows up as failed in logs. I will have to ask developer what is going on.