Skip to content

feat: Integrate OneTrainer into Windows ROCm Helper [Windows/AMD]#1684

Draft
NeuralFault wants to merge 6 commits into
LykosAI:mainfrom
NeuralFault:win-rocm-onetrainer
Draft

feat: Integrate OneTrainer into Windows ROCm Helper [Windows/AMD]#1684
NeuralFault wants to merge 6 commits into
LykosAI:mainfrom
NeuralFault:win-rocm-onetrainer

Conversation

@NeuralFault

Copy link
Copy Markdown
Contributor

Adds Windows ROCm installation and launch support to the OneTrainer training package for AMD GPU users on Windows. OneTrainer upstream only supported Linux ROCm via requirements-rocm.txt as there was no Windows-native ROCm path.

This will integrate new installs of OneTrainer with the ROCm Technical Preview ROCm/Pytorch build, default environment variable generation and pass-through by the ROCm helper based on user's hardware, and automatic installation of needed dependencies to match upstream.

Changes:

    • New: OneTrainerWindowsRocmProfile.cs - ROCm profile modeled on InvokeAI's pattern. Installs triton-windows plus the bitsandbytes ROCm wheel by 0xDELUXA (Python 3.12 only).
    • OneTrainer.cs - Injects IRocmPackageHelper and adds a Windows ROCm install branch using StandardPipInstallProcessAsync + InstallWindowsNativeTorchAsync with requirements-default.txt. The existing CUDA / Linux ROCm path is preserved untouched inside the else block. Launch environment is wired via BuildLaunchEnvironment when ShouldApplyWindowsLaunchEnvironment is true.
      Default Python version bumped up to 3.12 for new installs on all OS/Hardware platforms, both for Windows/ROCm compatibility and to also modernize the default installs within upstream documentation.
    • PackageFactory.cs - Passes IRocmPackageHelper to OneTrainer constructor.

- derived from InvokeAI profile.
- required bnb TheRock compat wheel, gated to Python 3.12 installs.
- triton-windows package install
- Inject IRocmPackageHelper and add Windows ROCm install path via StandardPipInstallProcessAsync + InstallWindowsNativeTorchAsync and OneTrainerWindowsRocmProfile for post-torch args
- Inject ROCm launch environment vars via BuildLaunchEnvironment when ShouldApplyWindowsLaunchEnvironment is true
- Bump RecommendedPythonVersion to 3.12 for all platforms

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces Windows ROCm support for the OneTrainer package. It updates the package factory and OneTrainer class to inject and utilize IRocmPackageHelper, configures recommended Python and Torch versions, handles Windows ROCm-specific installation steps (including custom pip packages like triton and bitsandbytes), and applies the necessary launch environment variables. The review feedback identifies critical typos in the newly added OneTrainerWindowsRocmProfile.cs file—specifically a misspelled namespace (StabilityMatrixc) and casing issues in the Default property definition—which will cause compilation failures and must be resolved.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread StabilityMatrix.Core/Models/Rocm/OneTrainerWindowsRocmProfile.cs Outdated
Comment thread StabilityMatrix.Core/Models/Rocm/OneTrainerWindowsRocmProfile.cs Outdated
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