Skip to content

Fix: pip requirements handling for environment-marker dependencies#1626

Merged
mohnjiles merged 3 commits intoLykosAI:mainfrom
NeuralFault:wan2gp-install-fix
May 2, 2026
Merged

Fix: pip requirements handling for environment-marker dependencies#1626
mohnjiles merged 3 commits intoLykosAI:mainfrom
NeuralFault:wan2gp-install-fix

Conversation

@NeuralFault
Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
Contributor

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

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 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.

@NeuralFault NeuralFault marked this pull request as ready for review May 1, 2026 21:51
Copy link
Copy Markdown
Member

@ionite34 ionite34 left a comment

Choose a reason for hiding this comment

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

Thanks looks good

@mohnjiles mohnjiles merged commit 86ecb1a into LykosAI:main May 2, 2026
3 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators May 2, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants