Skip to content

Add multi-GPU device routing - #1

Draft
Dillflix wants to merge 2 commits into
ideogram-oss:mainfrom
Dillflix:feature/multigpu-device-routing
Draft

Add multi-GPU device routing#1
Dillflix wants to merge 2 commits into
ideogram-oss:mainfrom
Dillflix:feature/multigpu-device-routing

Conversation

@Dillflix

Copy link
Copy Markdown

Summary

  • add IDEOGRAM4_DIFFUSION_DEVICE and IDEOGRAM4_TEXT_DEVICE environment-variable routing without changing the ComfyUI node interface or existing workflows
  • pass both roles to Ideogram4Pipeline.from_pretrained
  • include both devices in the pipeline cache key and log the resolved assignments during loading
  • add a focused wrapper test and experimental ROCm setup/documentation

Motivation

The wrapper currently constructs and caches a monolithic pipeline on cuda. This prevents users with multiple GPUs from placing the one-time Qwen3-VL text encoder separately from the repeatedly executed diffusion transformers and VAE.

When the new variables are unset, both roles still resolve to cuda, preserving existing behavior and workflow compatibility.

Core dependency

This wrapper change depends on ideogram-oss/ideogram4#38, which adds the backward-compatible text_device pipeline argument and compact pre-denoise feature transfer.

Validation

  • wrapper device-routing/cache-key unit test passes
  • Python compilation passes for nodes.py and the new test
  • targeted Ruff lint checks pass after excluding existing upstream rule violations
  • worktree and range diff checks pass

Hardware validation status

The available development host has CPU-only PyTorch, so the target ROCm configuration has not been run here. The README documents editable installation of the modified core, runtime device-name preflight, explicit indexed devices, the expected ComfyUI launch command, and the direct-transfer/CPU-staging behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant