Fix: pip requirements handling for environment-marker dependencies#1626
Merged
mohnjiles merged 3 commits intoLykosAI:mainfrom May 2, 2026
Merged
Fix: pip requirements handling for environment-marker dependencies#1626mohnjiles merged 3 commits intoLykosAI:mainfrom
mohnjiles merged 3 commits intoLykosAI:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the PipInstallArgs class to handle requirement entries more specifically by introducing the ToRequirementArgument method, which distinguishes between flags and standard requirements. It also adds a unit test to ensure that requirements with environment markers are correctly treated as single, quoted arguments. I have no feedback to provide.
mohnjiles
approved these changes
May 2, 2026
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 fix resolves a shared Stability Matrix requirements-handling bug that was reported in two places: ComfyUI extension installs on the SM Discord, specifically for the ComfyUI_PuLID_Flux_ll extension, and the Wan2GP install failure I reproduced locally. In both cases, the underlying problem was the same: valid requirements.txt entries containing environment markers were being mangled before they reached uv pip install.
For the ComfyUI extension case, the affected line is the upstream dependency entry:
onnxruntime-gpu; sys_platform != 'darwin' and (platform_machine == 'x86_64' or platform_machine == 'AMD64')
For the Wan2GP case, the affected lines are the upstream Python-version-gated onnxruntime-gpu entries:
onnxruntime-gpu==1.22.0; python_version < "3.11"
and
onnxruntime-gpu==1.25.0.dev20260210001; python_version >= "3.11"
The fix updates Stability Matrix’s shared pip requirements argument handling so environment-marker dependencies are preserved as single install arguments, and corrects command-line quoting so embedded quoted marker values such as "3.11" are escaped properly instead of being stripped or split. Regression tests were added to verify that marker-bearing requirement lines survive both parsing and final command-string generation correctly.