Linux Support (Wine)

No I don’t think NVAPI is relevant as the GPU processing doesn’t work on Linux anyway. You mentioned using the lutris variant of GE-Proton and since I have not tested that I cannot confirm if it works or not. If you’re unable to get your hands on the model files then there isn’t much point in trying to problem solve any further. As far as the install, I don’t know how far you’re getting but it should fail with an error along the lines of “the installer failed unexpectedly” which is when you would kill the install process. If it worked then you should find PhotoAI installed in your program files path for that bottle (without the model files). Beyond that I don’t know what to tell you, it works for me using the setting I provided so it’s at least possible but everyone’s system and setup is different. gl.

Yes, I tried the Lutris version of GE-Proton first but did eventually figure out how to download it from inside Bottles, so that’s what I have been using in recent attempts to install. The installer does indeed fail with the message “the installer failed unexpectedly”, at which point I terminated the process from Bottles as per your guide. I have found some .exe-files and when I run “tpai.exe” it does seem to start the program, but it fails with the error message: “Error | Model directory is empty!”. That seems to be consistent with your description of the process.

So, maybe I have actually managed to install the program except for the model files which seem to be required. If so, perhaps the only remaining stumbling block is to figure out what model files are needed and how to get hold of them. I have no idea how many different model files there are to choose from, nor how to determine which ones should be used. Initially I thought that there would be a limited number of models and that all or most of them would be useful, but if that were the case I don’t see why Topaz Support couldn’t just provide them given that they seemed willing to help. So presumably choosing the right model files is rather complicated and may depend on the particular hardware used…?

Yes it seems like the model files are hardware specific. I have an Intel CPU and NVIDIA GPU and here are the models that get installed for me on Windows:

adjust-normal-1.json
dnt_beta-v5-fp32-512x512-ov.tz
expoi-v1-fp32-256x256-1x-ov.tz
gclc-v1-fp32-192x192-2x-ov.tz
ggn_ap-v2-fp16-128x128-ov.tz
raw-linear-1.json
sharpen-landscape-masking-flexible.json
slsp-v3-fp32-512x512-ov.tz
text-refine-1.json
apnb-v2-fp32-512x512-ov.tz
dnt-v4-fp32-512x512-ov.tz
face-clc.json
gclc-v1-fp32-192x192-4x-ov.tz
ggn-v3-fp16-128x128-2x-ov.tz
raw-native-1.json
sharpen-normal-3.json
s_mask_l_flexible-v2-fp16-320x320-ov.tz
text-refine-n-1.json
auto-detect-1.json
draw_linear-v1-fp32-512x512-ov.tz
face-filter.json
gfclc-v1-fp32-512x512-ov-11.tz
ggn-v3-fp16-128x128-4x-ov.tz
raw-raw-1.json
sharpen-portrait-masking-flexible.json
sm_auto-v1-fp32-128x128-ov.tz
tpd-v1-fp16-ov.tz
autoNoiseParam2-ov.tz
drw_native-v1-fp16-512x512-ov.tz
face-mask.json
gffm-v1-fp32-512x512-ov.tz
ghq-v1-fp16-96x96-2x-ov.tz
raw-standard-1.json
sharpen-sm_auto-1.json
sm_auto-v1-fp32-128x128-ox.tz
trfn-v1-fp16-512x512-1x-ov.tz
clc-v2-fp32-512x512-ov.tz
drw_standard-v1-fp16-512x512-ov.tz
face-parse-large.json
gfg-v1-fp16-512x512-ov.tz
ghq-v1-fp16-96x96-4x-ov.tz
raw-strong-2.json
sharpen-smb-1.json
smb-v1-fp32-512x512-ov.tz
trf-v1-fp16-128x128-2x-ov.tz
clc-v3-fp16-512x512-ox.tz
drw_strong-v2-fp32-512x512-ov.tz
face-parse-small.json
gfg-v1-fp32-512x512-ox.tz
gmp-v1-fp32-192x192-2x-ov.tz
resize-cgi-1.json
sharpen-standard-2.json
smp_flexible-v2-fp16-320x320-ov.tz
trf-v1-fp16-128x128-4x-ov.tz
denoise-auto-1.json
drw_strong-v2-fp32-512x512-ox.tz
face-refine.json
gfpf-v1-fp16-48x48-ov.tz
gmp-v1-fp32-192x192-4x-ov.tz
resize-hq-1.json
sharpen-strong.json
sms_flexible-v2-fp16-320x320-ov.tz
wbc-v1-fp16-128x128-ov.tz
denoise-normal-4.json
drw-v1-fp32-512x512-ov.tz
gclc-v1-fp16-128x128-2x-ov.tz
gfp-l-v1-fp32-2048x2048-ov.tz
isoa-v1-fp32-512x512-ov.tz
resize-lowres-1.json
sharpen-subject-masking-flexible.json
sms_new-v3-fp16-320x320-ov.tz
WhiteBalanceData-v2.bin
denoise-normal-5.json
expo-g-1.json
gclc-v1-fp16-128x128-4x-ov.tz
gfp-s-v1-fp32-1024x1024-ov.tz
isob-v1-fp32-512x512-ov.tz
resize-normal-3.json
sharpen-subject-masking.json
sstd-v2-fp32-512x512-ov.tz
denoise-severe-1.json
expog-v1-fp16-512x512-1x-ov.tz
gclc-v1-fp16-96x96-2x-ov.tz
ggi-v1-fp32-192x192-2x-ov.tz
lmx-1.json
resize-normal-auto.json
sharpen-subject-masking-new.json
sstg-v1-fp32-512x512-ov.tz
denoise-strong-1.json
expo-i-1.json
gclc-v1-fp16-96x96-4x-ov.tz
ggi-v1-fp32-192x192-4x-ov.tz
lmx-v1-fp16-512x512-ov.tz
sharpen-auto-2.json
slsp_ap-v3-fp32-512x512-ov.tz
text-parse-1.json

Hope that helps.

Thanks xioren00topaz!

I have now managed to install Photo AI using your guide and with some help from the Topaz Support team in finding out which model files needed to be downloaded for my hardware.

The Support team suggested that having the installer download the model files automatically might work if one could install wininet and libraries for SSL/TLS. I tried to download wininet under Dependencies in Bottles, but it failed to install for some reason. Anyway, downloading the model files using curl in a shell script worked fine (once I knew which files to download).

One thing I haven’t been able to figure out is how to start the application without first starting Bottles. With Topaz DeNoise AI, I used “flatpak run --command…” but so far I haven’t been able to figure out how to do that for Photo AI. Of course, that’s just a minor inconvenience.

That part works now. The problem was that some directories had been renamed during installation (spaces in directory names were changed to “-”).

I was just able to get Photo AI running (including the installer and download of model-files) without having to move over the install directory from a windows machine. (PhotoAI version 1.1.9)
I’m using the flatpak version of bottles with

  • Runner: Wine-GE-Proton8-24
  • DXVK: 2.3
  • VKD3D: vkd3d-proton-2.10
  • DXVK NVAPI: dxvk-nvapi-v.0.6.4

First of all, I followed the suggestions of @xioren00topaz and installed all of the dependencies he listed and made the DLL override he mentioned. In addition to that I also installed

  • wininet
  • iertutil
  • urlmon

This part is tricky, because - as was already mentioned - the installation of wininet will fail, because windows6.1-kb976932-x64 cannot be found. Since wininet can also be installed via winetricks, I just checked where winetricks downloads this file from and got it from there. Then just place the file into the same tmp directory where the x32 version was downloaded to (for me it was ~/.var/app/com.usebottles.bottles/data/bottles/temp) and restart bottles. After that, the installation of the three dependencies should succeed. After they’ve been installed, add DLL-overrides for wininet, iertutil and urlmon (native, builtin). Not sure if you actually need these overrides, but I added them and it worked

Thanks dltz03,

I have finally managed to install wininet (and now iertutil and urlmon). I also got the 64 bit file through winetricks, but I had to rename it from windows6.1-KB976932-X64.exe to windows6.1-kb976932-x64.exe to make it work. It took me a while to realize that it was case sensitive in Bottles (but not in Wine?).

Have you tried to upgrade to a more recent version of Photo AI? I have managed to upgrade a few times, but not beyond version 2.0.5.

I still can’t get model files to download. Maybe older versions work but none of the newer versions will download model files. Furthermore as you pointed out any version beyond 2.0.5 flat out doesn’t work at all. Frustratingly the devs are progressively making the app less and less compatible.

Looking at the change log for v2.0.6, I noticed that they have upgraded Qt to version 6.6.0 and I suspect that that may be what is causing the problem. Most other changes look harmless in comparison, but upgrading Qt seems to have caused problems in the past. In this case, the problem went away when a new version of Wine was installed. Perhaps, if we are lucky, it will heal automatically when Wine gets an update…

New versions of Wine have been released recently and I decided to see whether TPAI version 2.3.0 would install using plain vanilla Wine (i.e. not Bottles).

First, I had some success using Wine 9.0. The TPAI program installed although the installer threw the usual error message at the end (“ended with unexpected result” or some such). TPAI would start, download some models and when I loaded an image it seemed to analyze it and then it tried to download some more models. Eventually the program would hang until I terminated it. Tried it a few times with similar results.

However, after updating Wine to v9.1, I tried to reinstall TPAI v2.3.0. The installer detected that it had been installed before and offered to repair the installation. Amazingly, it came back and reported having successfully repaired TPAI.

I launched the program and to my surprise it worked. However, it seems much slower than v2.0.6 in a Bottle. Perhaps tweaking the Wine environment can improve its performance or is Bottles more efficient somehow? Unfortunately, Wine 9.x will probably not appear in Bottles anytime soon since Bottles is currently undergoing a heavy re-write.

So far I’ve only used TPAI v2.3.0 in demo mode as I will probably continue to use v2.0.6 until I can get the newer version to run at a comparable speed. xioren00topaz installed a lot of components and dependencies in Bottles to make older versions work well and one might expect that similar tweaking could improve performance under vanilla Wine. If anyone who is familiar with Wine and/or Windows wants to experiment with the environment in Wine 9.x, there may be room for improvement…

Update:

Version 2.3.0 under Wine 9.1 seemed to work quite well in demo mode. Initially it seemed a bit more sluggish than v2.0.6 under Bottles, but I now think that was mostly because the default settings caused it to process images more aggressively than I want. When I dialed down the settings it performed better and processing times were similar between the two versions.

So I decided to activate the license, but that didn’t work. Nor did access to help pages work (e.g. the links to “Getting Started”, “User Guides”, “Features” and “Plugins”; nor “Report an issue” in the Help menu), so the problem may be that it simply can’t call up the web browser. The program hangs, without error messages, until I terminate the process. Other menu entries (e.g. “Open Log Folder”) that don’t involve a browser, seem to work.

I have now installed Firefox and made it the default browser in the Wine prefix, but that made no difference. I even edited the registry in Wine (How To Make WINE Open Links In Your Default Linux Browser ~ Web Upd8: Ubuntu / Linux blog) but those instructions are quite old (from 2010) and may not be applicable today.

The problem may be trivial, once you find the solution…

Lo and behold… v2.3.0 now works under Wine v9.1!

I don’t know why it didn’t work initially, but the problem was probably related to some settings in ~/.wine and the fix was to delete the whole directory and then allowing it to be recreated automatically by Wine v9.1.

The installer still encounters some problem and needs to run twice. The first time I ran it, it threw the usual error message about some unexpected error. I killed the process from outside the program (not letting it complete) and then restarted the installer at which point it detected the failed installation and offered to repair it, which I let it do. This time, the installer reported success and I allowed it to complete and exit.

After loading the first image, TPAI started to download additional models which took a long time but it worked and eventually it started to process the image. A second test image loaded much quicker and the first few adjustments (noise removal, sharpening) I made seemed to work. Balancing color took so long that I thought it was stuck, but it worked eventually.

As a final test, I tried to upgrade the program to v2.3.1 using the prompt inside the program. It downloaded and then tried to install, but failed. Downloading and installing v2.3.1 manually worked although it required the same two stages as v2.3.0, i.e. first a failed install followed by a successful repair.

1 Like

Does anyone use an AMD graphics card, or does it require an Nvidia for the program to work even through wine? I have an AMD 5700x + RX 6600 XT.

I have not been able to get Topaz programs to work despite several attempts over the years.
I have tried Ubuntu, Debian, Fedora, PopOS, Arch, Gentoo and multiple WM’s without any luck.

I haven’t used AMD graphics, but TPAI does not require Nvidia specifically. I have a humble Intel HD Graphics 530 GPU, and TPAI finds and seems to use it. At least GPU load goes from around 1% to 30-50% when TPAI is busy. I use Linux Mint.

In response to your previous two posts, the newer versions still fail during installation for me however I can confirm that I was able to download models from within the app. Also progress seems like its being made with Nvidia GPUS. In gpu mode it will process images but the output images are just blurry and unusable, however face enhance seems to work. In other words, I can get blurry images but an enhanced face in GPU mode, which is new.

I have not encountered that problem; once I’ve managed to install the program, the resulting images have met or exceeded my expectations. I have not processed a huge number of images, perhaps 30-50 or so in total, using different versions of TPAI. In most cases I have started with a RAW image and applied a minimal amount of noise removal and/or sharpening.

I don’t have a NVIDIA GPU so I have not tested that. My nine year old Intel HD Graphics 530 is recognized and put to work.

I have not seen how well TPAI works on Windows/Mac, but performance doesn’t seem to be an issue on my Intel i7-6700 (8) @ 4.000GHz with 16GB RAM. I’m sure it would be faster on newer hardware, but as long as the resulting images are good, I’m not complaining if I have to wait a few seconds longer than someone with more powerful hardware and an OS that is fully supported.

I wonder whether the issues you are seeing are related to that particular combination of Wine and NVIDIA GPU? In other words, does TPAI generally work under Wine except with certain GPUs or is the problem primarily related to NVIDIA? I have seen forum posts indicating that some people have had problems with certain NVIDIA GPUs even under Windows and/or macOS, but I haven’t studied the issue. Have you tried using TPAI under Windows on the same machine? You mentioned earlier that you downloaded model files using Windows, but I don’t know whether that was on the same machine.

Are you still using Bottles or are you now using plain vanilla Wine v9.x? I was never able to get the most recent versions of TPAI to work with the slightly older version of Wine that Bottles was (and still is?) based on.

Yes I still use Bottles. The Caffe runner is usually pretty up to date (currently based on WINE 9.2) and Soda (which is the default runner in Bottles) is usually a little behind because it is based on Valve’s Proton. You can also install other runners such as Glorious Eggroll’s. To clarify, the issue I described is when trying to use the GPU; CPU still works fine for me.

I see. So the GPU problem is probably somewhat specific to NVIDIA since Intel graphics cards generally seem to work. I don’t know about AMD, but VuPa JJ reported a problem with AMD 5700x + RX 6600 XT, and I don’t know whether that issue has been resolved.

Sounds good. I also noticed that Wine v9.4 included upgraded graphics support (new version of vkd3d and OpenGL support in the Wayland driver) so hopefully the situation will improve.