LTX-Desktop icon indicating copy to clipboard operation
LTX-Desktop copied to clipboard

Multi-GPU is not used in LTX-Desktop - how do I enable it?

Open catclaw opened this issue 8 months ago • 8 comments

Hi! I have a multi-GPU workstation with 3 Nvidia RTX GPUs, each with 12GB VRAM = 36 GB. However, LTX-Desktop keeps using API? How can I make LTX Desktop use all my 3 GPU to generate the video offline on my computer? EDIT: I have 2 Nvidia RTX 3060 Dual OC 12GB and one Nvidia RTX 5070 12GB

catclaw avatar Mar 30 '26 01:03 catclaw

me2

I have 5060TI 16GB x3 in one PC and 4090 24GB x2 in another PC, unable to use non-API mode.

befprg avatar Apr 02 '26 03:04 befprg

++++ need multigpu support.

HakkiAlkan avatar Apr 03 '26 01:04 HakkiAlkan

This is needed, even if it's only to offload text encoder and vae.

MikeStone66 avatar Apr 10 '26 19:04 MikeStone66

+1

ukrospm avatar Apr 16 '26 08:04 ukrospm

I think it’s possible with the Raylight node. It doesn’t just share memory; it runs in parallel by utilizing the CUDA cores on both cards. You can assign Gemma to the third card using the multiGPU node.

However, the most important thing here is that since the two cards need to constantly communicate with each other, I had to install Linux. This is because you need to enable P2P by installing a modified NVIDIA driver via PCIe 4.0 x8 x8 or NVLink. You can’t do this on Windows. NVIDIA has disabled P2P at the driver level on consumer-grade cards.

I have a system with two 3090s. So far, it seems to be working without any issues.

HakkiAlkan avatar Apr 16 '26 08:04 HakkiAlkan

Guys come on a simple choice for the text encoder or at least pin it to CUDA_VISIBLE_DEVICES=0 that the user can start LTX Desktop with CUDA_VISIBLE_DEVICES=1.

averageaidude avatar Apr 21 '26 20:04 averageaidude

Edit: LTX Desktop will never include the optimizations I mentioned. That’s because they won’t work on 90% of users’ computers. These are advanced tweaks. You’ll need to set them up yourself via ComfyUI.

If you have 48 GB of RAM or more, it might make sense to load the Gemma text encoder onto the CPU. (I’m having issues with Gemma on RAM/CPU with 32 GB of RAM.) You can do this using the LTX multi-GPU node as well. However, to load the LTX model entirely onto the GPU, you definitely need the Raylight node.

This is because the Multigpu node only allows assigning single models to the CPU, GPU0, GPU1, and GPU2. What this user needs is to split the LTX video model entirely into 12 + 12 + 12.

To do this, they can use Raylight to split the entire model across three cards. However, the main issue here is the communication speed between the cards.

To explain using two cards as an example:

If the cards are running at x8 x8 speeds over PCIe 4.0: ~8–11 GB/s If the cards are running at x8 x8 speeds on PCIe 5.0: ~10–14 GB/s

These are the values NVIDIA allows in the consumer class. However, if you install Linux and load the NVIDIA GPU kernel module from tinygrad or aikitoria, NVIDIA’s P2P mode—available in server systems—will be enabled. With P2P disabled, the system will operate as GPU -> PCIe -> CPU/RAM -> PCIe -> GPU. If you enable P2P mode, it will operate as GPU -> PCIe (Root/Switch) -> GPU. This will not only increase the speed but also minimize latency.

This time, the values will be as follows:

If the cards are running at x8 x8 speeds on PCIe 4.0: 15.75 GB/s If the cards are running at x8 x8 speeds on PCIe 5.0: 31.51 GB/s

I have a system similar to my friend’s. I have 3x 3090 cards. Before getting NVLink, my setup was configured as x8 x8 x4, and using Raylight, I loaded the main models onto the cards running at x8 speed and one-off models like text encoders onto the card running at x4 speed.

Of course, it’s not just the cards’ communication speed that matters. Let me give an example: While NVLink connects two cards at ~112.5 GB/s, even if you achieve the same speed over a PCIe bus, NVLink will always come out on top. This is because latency comes into play. When you split the model across two cards, the cards will attempt to communicate with each other thousands of times per second. This results in a latency of 1.5–2.5 µs on a PCIe 5.0 infrastructure, whereas NVLink achieves 0.5 µs.

If you have any questions, I’m happy to help. Have a good day.

HakkiAlkan avatar Apr 21 '26 21:04 HakkiAlkan

Edit: LTX Desktop will never include the optimizations I mentioned. That’s because they won’t work on 90% of users’ computers. These are advanced tweaks. You’ll need to set them up yourself via ComfyUI.

If you have 48 GB of RAM or more, it might make sense to load the Gemma text encoder onto the CPU. (I’m having issues with Gemma on RAM/CPU with 32 GB of RAM.) You can do this using the LTX multi-GPU node as well. However, to load the LTX model entirely onto the GPU, you definitely need the Raylight node.

This is because the Multigpu node only allows assigning single models to the CPU, GPU0, GPU1, and GPU2. What this user needs is to split the LTX video model entirely into 12 + 12 + 12.

To do this, they can use Raylight to split the entire model across three cards. However, the main issue here is the communication speed between the cards.

To explain using two cards as an example:

If the cards are running at x8 x8 speeds over PCIe 4.0: ~8–11 GB/s If the cards are running at x8 x8 speeds on PCIe 5.0: ~10–14 GB/s

These are the values NVIDIA allows in the consumer class. However, if you install Linux and load the NVIDIA GPU kernel module from tinygrad or aikitoria, NVIDIA’s P2P mode—available in server systems—will be enabled. With P2P disabled, the system will operate as GPU -> PCIe -> CPU/RAM -> PCIe -> GPU. If you enable P2P mode, it will operate as GPU -> PCIe (Root/Switch) -> GPU. This will not only increase the speed but also minimize latency.

This time, the values will be as follows:

If the cards are running at x8 x8 speeds on PCIe 4.0: 15.75 GB/s If the cards are running at x8 x8 speeds on PCIe 5.0: 31.51 GB/s

I have a system similar to my friend’s. I have 3x 3090 cards. Before getting NVLink, my setup was configured as x8 x8 x4, and using Raylight, I loaded the main models onto the cards running at x8 speed and one-off models like text encoders onto the card running at x4 speed.

Of course, it’s not just the cards’ communication speed that matters. Let me give an example: While NVLink connects two cards at ~112.5 GB/s, even if you achieve the same speed over a PCIe bus, NVLink will always come out on top. This is because latency comes into play. When you split the model across two cards, the cards will attempt to communicate with each other thousands of times per second. This results in a latency of 1.5–2.5 µs on a PCIe 5.0 infrastructure, whereas NVLink achieves 0.5 µs.

If you have any questions, I’m happy to help. Have a good day.

Well... I have a server motherboard, and all three PCIe 4.0 slots are x16 for all three GPUs. As you mentioned earlier, Nvidia P2P is not available for Windows, but it's still fully possible to split a model across two or more GPUs. Ollama does this with OLLAMA_SCHED_SPREAD, so I can load larger models than a single GPU would allow me. So, why not do the same with LTX?

catclaw avatar Aug 09 '26 08:08 catclaw