Skip to content

better validation ux for attention mechanism selection - #2455

Merged
bghira merged 1 commit into
mainfrom
ux/earlier-errors-for-attention-impl
Jan 20, 2026
Merged

better validation ux for attention mechanism selection#2455
bghira merged 1 commit into
mainfrom
ux/earlier-errors-for-attention-impl

Conversation

@bghira

@bghira bghira commented Jan 20, 2026

Copy link
Copy Markdown
Owner

This pull request introduces improved validation for attention mechanism selection in both configuration normalization and server-side validation logic. The main focus is to ensure users receive clear error messages when selecting unsupported attention mechanisms, specifically addressing compatibility issues with xformers on certain GPUs and the availability of sageattention.

Attention mechanism validation improvements:

  • Added is_sageattention_available and xformers_compute_capability_error helper functions to attention_backend.py to check for SageAttention installation and xformers GPU compatibility, respectively.
  • Updated _normalize_input_args in cmd_args.py to raise a ValueError if xformers is selected on unsupported GPUs, or if sageattention is requested but not installed.
  • Enhanced server-side validation in validation_service.py to add configuration errors for unsupported xformers or missing sageattention, improving feedback to users during config validation.

Internal API changes:

  • Imported the new attention mechanism validation helpers into both cmd_args.py and validation_service.py to enable their use in argument normalization and validation logic. [1] [2]

@bghira
bghira merged commit 08d1c33 into main Jan 20, 2026
2 checks passed
@bghira
bghira deleted the ux/earlier-errors-for-attention-impl branch January 20, 2026 15:19
samzhang996-hue pushed a commit to samzhang996-hue/SimpleTuner that referenced this pull request Apr 27, 2026
…ntion-impl

better validation ux for attention mechanism selection
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