Hacker News new | ask | show | jobs
by irusensei 944 days ago
> AMD GPU: supported via DirectML, Windows only

Uh... I'm not happy with this trend. Thankfully there is an option for using a ComfyUI, a torch based project as a backend.

5 comments

ComfyUI works perfectly fine with ROCm on Linux. Using it with this krita plugin also works flawlessly. The docs are simply incorrect in saying that it's Windows-only.

I assume it's the case because the automatic ComfyUI installer that comes with this project doesn't know how to install/configure ROCm. Using your own ComfyUI installation works perfectly. I'll open a ticket with the author of the project to discuss this.

Source: I installed this yesterday on my Ubuntu computer with a 7900xtx and ROCm in Comfy

That's not a trend that's basically the norm for generative ai and AMD is to blame for it not the devs.
It should not be. Torch and AMD has been a thing forever on Linux even before Windows. The underlying comfyUI supports it. In fact someone replied here it might have been a mistake.
Why is that the case? Tools like OpenCL do exist, but I assume CUDA is simply better suited for these tasks, is that true?

(With the dominance of CUDA, choice of a GPU on Linux gets even harder. It used to be a clear "fuck you Nvidia" if you wanted to use Wayland, but Nvidia definitely has the lead when it's about video editing and machine learning.)

AMD's OpenCL implementation and tooling on Windows is terrible, even worse than NVIDIA's OpenCL tooling, and on Linux their ROCm stuff has been so unreliable in terms of its hardware support that it isn't worth the investment.
I'm on mobile and haven't looked at this project, but usually DirectML support is added as a torch backend. Instead of device = "cuda" if torch.cuda.is_available() else "cpu" you add import torch_directml device = torch_directml.device()

How else are you supposed to support AMD in Pytorch on Windows?

My comment was about the “AMD - Windows only” part of readme.
My point was that it's not a matter or DirectML or torch, it's simply a choice of backend for torch. It's an easy way of adding AMD support to torch based projects in Windows, there's probably an equally easy way of adding ROCm support in Linux. It's just that using cpu or Cuda is built in and usually the two default options when writing torch code, and somebody have to care enough to explicitly add AMD support.

It's not exactly as easy as just changing one line by the way, not all operations are implemented so there's some testing and maybe some rewrites needed. Hopefully the GPU backend mess gets solved in the general case soon.

It was more like a case of the author not having AMD hardware to test their automated installer: https://github.com/Acly/krita-ai-diffusion/issues/76
> Thankfully there is an option for using a ComfyUI

Its not an option for using ComfyUI; its an option to use an external ComfyUI instance instead of one embedded in the plugin, this uses ComfyUI one way or the other.

Is it a trend, already? I mean I can get behind ambition, but jesus, everything is new, people are cooking. Let's give it a few month.
It's always been a trend and always will be until AMD gets their shit together. NV spends a lot to make sure CUDA has the market share it does (marketing, establishing a foothold in academia, partnerships etc), AMD is working on it but progress is slow.
It’s not that NV spends a lot to get market share. It’s that for over a decade NV provided the actual tools to build all this and AMD didn’t and then when they finally did they fumbled it, then when it finally paid off big for Nvidia they had to start from scratch again.

People might not like it but Nvidia’s dominance is completely deserved from the actions, or should I say inactions of the now disbanded OpenCL crowd