Haidra-Org / horde-worker-reGen

The default client software to create images for the AI-Horde
https://aihorde.net/
GNU Affero General Public License v3.0
93 stars 42 forks source link

rocm version via index url #313

Closed HPPinata closed 1 month ago

HPPinata commented 1 month ago

--extra-index-url https://download.pytorch.org/whl/rocmX.Y is sufficient to install the right package. This also makes A/B version testing easier.

tazlin commented 1 month ago

You did bring to my attention that the files did not match. However, you could practically get the same convenience that I think you're trying to bring to this file by using the main requirements.txt instead. It is supposed to be otherwise identical and I foresee that remaining to be the case.

The purpose of the rocm tag in the torch requirement is more to help avoid the pitfall of accidently installing the cpu or CUDA version of torch when using AMD. In fact, the existence of the requirements.rocm.txt file dates back to a time where you would have had to have had installed it manually via the command line.

There might be something I'm missing here. If you still think its worth adding, let me know why.

HPPinata commented 1 month ago

I just stumbled across this when trying to A/B test different ROCm versions.

With the explicit version tag removed this can be done exclusively in the Dockerfile building the environment. If it's part of the requirements.txt I have to point the build to my fork.

I haven't looked at whether it "just works" with the standard requirements.txt but will test that shortly.

This isn't really too relevant (the fork exists now, might as well use it), just a bit annoying and a potentially unified requirements.txt might be a cleaner solution if it actually ends up working out.

tazlin commented 1 month ago

Yea, as it is, the rocm reqs file is more of a legacy artifact from when support was experimental. Maybe it should be unified sooner than later.

HPPinata commented 1 month ago

I did some more testing, and so far just using the main requirements.txt has worked fine.

I added the wheel dependency from the requirements.rocm.txt after a flash_attn build failed, but that might also just have been my flaky network connection.

I'll do a bit more testing (maybe also with older versions) and I haven't tried out how the conda environment reacts to this, but it's looking good for having just one file.

tazlin commented 1 month ago

In any order of your choosing regarding the other pending PRs by you and me, please rebase this PR at some point and I will include it in raw-png.

HPPinata commented 1 month ago

@tazlin this is also ready to be merged