VisoMaster icon indicating copy to clipboard operation
VisoMaster copied to clipboard

Does Viscomaster support 50 series graphics cards

Open Jandown opened this issue 1 year ago • 10 comments

Does Viscomaster support 50 series graphics cards?

Jandown avatar Mar 10 '25 14:03 Jandown

I got it to work on my RTX 5080

I am totally new to python and github stuff and am a bit amazed about myself lol...

I tried updating Cuda in Visomaster folder also but this was not necessary as it said its already installed. Wasnt sure if I need an update for 12.8. But seems like I did not.

I think what I did was the following:

-Install the portable installer of Visiomaster

-Open CMD Tool and navigate to "...Visomaster/dependecies/Python/" folder.

-Copy this line """python.exe -m pip install --upgrade --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu128""" to upgrade Pytorch.

-I think during this upgrade it mentioned I need to add "...Visomaster/dependecies/Python/scripts" to the Windows Variables PATH which I did. Not sure if it was that folder but it should tell you in yellow writing.

-After that I tried to start the start portable.bat and it gave me an error... Something like "Plain Typing is not a valid argument in Typing.py" or something.

-I opened the typing.py file in ...Visomaster/dependecies/Python/ or ...Visomaster/dependecies/Python/Lib not sure where it was exactly and i am not on my PC at the moment. I opened it and searched for "Plain" until I found the line responsible for the error. Removed the complete line starting with IF. (Its sandwiched in 2 other lines starting with IF that I did not remove. If that makes any sense lol) and saved it.

-After that I tried starting portable.bat again, waiting for the next error to wrap my head around but after some loading time it actually started and even works.

Not sure if there was any other quirks as I have tried way more complicated copy paste lib stuff from Comfyui for cu128 and whatnot But I think it really just was: Upgrading Pytorch, Add "...Visomaster/Python/Scripts" to Path and delete the Plain Typing argument line in Typing.py.

Maybe this also works for someone else :)

TwistedGit avatar Mar 20 '25 09:03 TwistedGit

I got it to work on my RTX 5080

I am totally new to python and github stuff and am a bit amazed about myself lol...

I tried updating Cuda in Visomaster folder also but this was not necessary as it said its already installed. Wasnt sure if I need an update for 12.8. But seems like I did not.

I think what I did was the following:

-Install the portable installer of Visiomaster

-Open CMD Tool and navigate to "...Visomaster/dependecies/Python/" folder.

-Copy this line """python.exe -m pip install --upgrade --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu128""" to upgrade Pytorch.

-I think during this upgrade it mentioned I need to add "...Visomaster/dependecies/Python/scripts" to the Windows Variables PATH which I did. Not sure if it was that folder but it should tell you in yellow writing.

-After that I tried to start the start portable.bat and it gave me an error... Something like "Plain Typing is not a valid argument in Typing.py" or something.

-I opened the typing.py file in ...Visomaster/dependecies/Python/ or ...Visomaster/dependecies/Python/Lib not sure where it was exactly and i am not on my PC at the moment. I opened it and searched for "Plain" until I found the line responsible for the error. Removed the complete line starting with IF. (Its sandwiched in 2 other lines starting with IF that I did not remove. If that makes any sense lol) and saved it.

-After that I tried starting portable.bat again, waiting for the next error to wrap my head around but after some loading time it actually started and even works.

Not sure if there was any other quirks as I have tried way more complicated copy paste lib stuff from Comfyui for cu128 and whatnot But I think it really just was: Upgrading Pytorch, Add "...Visomaster/Python/Scripts" to Path and delete the Plain Typing argument line in Typing.py.

Maybe this also works for someone else :)

I saw someone successfully running on platforms based on Torch 2.6 and CUDA 12.6, so the 50 series graphics card should only need to update Torch and CUDA. Thank you for your answer

Jandown avatar Mar 20 '25 09:03 Jandown

Well I tried updating CUDA folder in Visomaster but it said its already installed.

I used -m pip install nvidia-cuda-runtime-cu12

Would I need a differnt one?

As said I am a total noob and think Cuda 12.4 is whats still installed as I didnt uprade. Should still be the one which is installed in the portable version if you check 12.4 during installation.

However it works after just upgrading Torch. Or would it work better with upgrade to 12.8 or should it not work in theroy if it would still be on 12.4?

It surely uses GPU when using the program.

TwistedGit avatar Mar 20 '25 15:03 TwistedGit

Use the manual install instructions in the readme, using conda, install CUDA using this line:

conda install -c nvidia/label/cuda-12.8.1 cuda-runtime

edit requirements_cu124.txt (or make one called requirements_cu128.txt) to start with this:

--extra-index-url https://download.pytorch.org/whl/cu128

and update these lines:

torch==2.7.0+cu128
torchvision==0.22.0+cu128
torchaudio==2.7.0+cu128

Do the rest of the manual install steps.

Finally update the typing.py file to remove the if statement that throws the error (lines 170 and 171 at the time of writing this):

#    if isinstance(arg, _SpecialForm) or arg in (Generic, Protocol):
#        raise TypeError(f"Plain {arg} is not valid as type argument")

Seems to run fine

siriShah302 avatar Apr 29 '25 03:04 siriShah302

Use the manual install instructions in the readme, using conda, install CUDA using this line:

conda install -c nvidia/label/cuda-12.8.1 cuda-runtime

edit requirements_cu124.txt (or make one called requirements_cu128.txt) to start with this:

--extra-index-url https://download.pytorch.org/whl/cu128

and update these lines:

torch==2.7.0+cu128
torchvision==0.22.0+cu128
torchaudio==2.7.0+cu128

Do the rest of the manual install steps.

Finally update the typing.py file to remove the if statement that throws the error (lines 170 and 171 at the time of writing this):

#    if isinstance(arg, _SpecialForm) or arg in (Generic, Protocol):
#        raise TypeError(f"Plain {arg} is not valid as type argument")

Seems to run fine

I have successfully run on a 50 series graphics card, but I am unable to use TensorRT acceleration and can only use CUDA. Do you have this issue

Jandown avatar Apr 29 '25 03:04 Jandown

Hey @Jandown - certainly do have this issue. I upgraded tensorrt and the libs and still see it. Do we know if this works on pre-blackwell/50xx cards? Not sure if it's the model, the code or the libraries. After injecting some logging it seems like tensorRT works fine loading RetinaFace and Inswapper128ArcFace, but fails on SimSwapArcFace, GhostArcFace, CSCSArcFace, CSCSIDArcFace and others. This is way past my area of expertise but an interesting dig. The only record of this error message on the googles is when they decommed pascal in tensorrt v8 but the tensorrt library clearly states blackwell support. Just sharing notes.

Edit: okay I might be nuts but looking at the models, I see all the onnx files but the .trt files just aren't there? Would be interested if anyone could confirm TensorRT functioning on non-blackwell

siriShah302 avatar Apr 30 '25 17:04 siriShah302

Hey @Jandown - certainly do have this issue. I upgraded tensorrt and the libs and still see it. Do we know if this works on pre-blackwell/50xx cards? Not sure if it's the model, the code or the libraries. After injecting some logging it seems like tensorRT works fine loading RetinaFace and Inswapper128ArcFace, but fails on SimSwapArcFace, GhostArcFace, CSCSArcFace, CSCSIDArcFace and others. This is way past my area of expertise but an interesting dig. The only record of this error message on the googles is when they decommed pascal in tensorrt v8 but the tensorrt library clearly states blackwell support. Just sharing notes.

Edit: okay I might be nuts but looking at the models, I see all the onnx files but the .trt files just aren't there? Would be interested if anyone could confirm TensorRT functioning on non-blackwell

I consulted ChatGTP and the problem seems to be that TensorRT cannot compile ONNX on 50 series graphics cards. So I tried to change the version of ONNXRime, but the problem still hasn't been solved

Jandown avatar May 01 '25 03:05 Jandown

On a whim I downloaded TensorRT 10.9 and attempted to use trtexec to convert the of the onnx models to trt on my 5080. It seems to have worked, but again I am not very knowledgeable about how all of these pieces work together. Later on I might try to convert some of these manually and see if the app picks them up. I just don't see in the code where these trt files could come from if it wasn't a 50 series card.

siriShah302 avatar May 01 '25 14:05 siriShah302

On a whim I downloaded TensorRT 10.9 and attempted to use trtexec to convert the of the onnx models to trt on my 5080. It seems to have worked, but again I am not very knowledgeable about how all of these pieces work together. Later on I might try to convert some of these manually and see if the app picks them up. I just don't see in the code where these trt files could come from if it wasn't a 50 series card.

May I ask how you converted it? Can you share the specific implementation steps

Jandown avatar May 01 '25 15:05 Jandown

Hey, sure, sorry I may not be super specific as I didn't document it at the time but here is what i did:

  1. Download TensorRT SDK from https://developer.nvidia.com/tensorrt
  2. Unzip the package and add the /bin and /lib to path
  3. Open a command prompt and navigate to a folder with onnx models, like the model_assets folder.
  4. Convert using trtexec using this command (using face_blendshapes as an example): trtexec --onnx=face_blendshapes_Nx146x2.onnx --saveEngine=face_blendshapes_Nx146x2.trt

I didn't do anything with the resulting file, nor did I tweak the trtexec parameters, but it seemed to work on my 5080

siriShah302 avatar May 02 '25 02:05 siriShah302