Conversation
…tection in Device.py
…optimization guides
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds comprehensive support and documentation for running LightDiffusion-Next on AMD GPUs (ROCm) and Apple Silicon (Metal/MPS), alongside NVIDIA GPUs. It introduces a new setup guide, expands installation instructions, and updates device detection and optimization logic throughout the codebase to handle ROCm and MPS platforms. There are also improvements to documentation for new features and platform-specific optimizations.
Platform Support and Documentation:
rocm-metal-support.mdguide covering setup, compatibility, feature support, and troubleshooting for AMD ROCm and Apple Silicon MPS platforms.README.mdanddocs/installation.mdnow explicitly mention AMD (ROCm) and Apple Silicon (MPS) support, including links to the new setup guide and platform-specific requirements. [1] [2] [3]Device Detection and Backend Logic:
is_rocm()detection and updated device logic inDevice.pyto properly enable/disable features (e.g., SageAttention, SpargeAttn, xformers, PyTorch attention) based on ROCm or MPS presence. This includes correct dtype selection and memory/cache management for each platform. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]Documentation Enhancements:
These changes collectively make LightDiffusion-Next more accessible and performant across a wider range of hardware, with clear guidance and robust platform detection.
References: [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17]