docs: add Python package install guide for ComfyUI Portable (zh/ja/ko)#1299
Conversation
|
Warning Review limit reached
Next review available in: 50 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThe portable Windows guides now explain installing additional packages with embedded Python and adding required startup flags to launcher batch files. Japanese, Korean, and Chinese translation metadata and localized instructions are updated. ChangesPortable Windows installation
Suggested reviewers: 🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@installation/comfyui_portable_windows.mdx`:
- Around line 158-164: Update the attention optimization guidance before the
startup command example to state that --use-flash-attention and
--use-sage-attention are mutually exclusive, so users must enable only one even
though both packages may be installed.
- Around line 151-155: Update the FlashAttention and SageAttention installation
instructions near the “Install FlashAttention” and “Install SageAttention”
headings to document their Windows build constraints, including experimental
FlashAttention support, required build prerequisites, the matching CUDA/PyTorch
toolchain, and the necessary --no-build-isolation option. Either pin versions
validated for this portable bundle or provide the exact supported build recipe
instead of presenting generic pip installs.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 56c865ee-2ee6-40f9-a34b-a88402face2f
📒 Files selected for processing (1)
installation/comfyui_portable_windows.mdx
| # Install FlashAttention | ||
| .\python_embeded\python.exe -m pip install flash-attn | ||
|
|
||
| # Install SageAttention | ||
| .\python_embeded\python.exe -m pip install sageattention |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Inspect the relevant section of the MDX file with line numbers.
sed -n '140,170p' installation/comfyui_portable_windows.mdx
# Map the file structure to see nearby headings and context.
ast-grep outline installation/comfyui_portable_windows.mdx --view expandedRepository: Comfy-Org/docs
Length of output: 1298
🌐 Web query:
flash-attn installation documentation no-build-isolation windows support experimental sageattention installation no-build-isolation official docs startup flags attention options mutually exclusive
💡 Result:
Flash-Attention and SageAttention are distinct libraries used for optimized attention computation; they are not mutually exclusive and can be installed and used in the same environment [1][2][3]. Flash-Attention Windows Support Official flash-attn documentation states that the library is primarily designed for Linux [4]. While some users have reported successful compilation on Windows, it is considered experimental, is not officially supported, and there are no official pre-compiled Windows wheels [4][5]. Attempts to install via pip (even with --no-build-isolation) frequently fail due to missing dependencies (e.g., CUDA toolkit, MSVC, ninja), extreme build times, and RAM exhaustion [6][5]. For Windows users, it is generally recommended to use WSL2, rely on built-in attention implementations (such as sdpa) in libraries like vLLM or PyTorch, or use community-provided wheels [5]. SageAttention Installation SageAttention installation depends on your desired version and performance requirements: 1. SageAttention V1 (Triton-only): Can be installed via pip (pip install sageattention==1.0.6) [1][7]. 2. SageAttention 2.x and later: The official recommendation is to compile from source to ensure compatibility with your specific environment [1][7][8]. Installation command: git clone https://github.com/thu-ml/SageAttention.git cd SageAttention pip install. --no-build-isolation Startup Flags and Attention Options There are no global startup flags that make Flash-Attention and SageAttention mutually exclusive at the library level [1]. If you are using libraries like HuggingFace Transformers, you typically select the attention implementation via configuration (e.g., attn_implementation="flash_attention_2" or "sdpa") [5]. If you encounter performance issues or conflicts, you should check your specific model's attention configuration rather than assuming a mandatory mutual exclusivity [9]. Top Results: [4], [5], [1], [2]
Citations:
- 1: https://github.com/thu-ml/sageattention
- 2: https://github.com/thu-ml/SageAttention
- 3: https://github.com/thu-ml/SageAttention/blob/c9f4cd71/bench/README.md
- 4: https://pypi.org/project/flash-attn/2.7.4.post1/
- 5: https://www.runlocalai.co/errors/flash-attn-install-windows
- 6: [BUG] Installation on Windows Fails Through Multiple Cascade Errors (CUDA, C++, Long Paths, Archs) [FIX FOUND BY ME] Dao-AILab/flash-attention#1916
- 7: https://github.com/thu-ml/SageAttention/blob/c9f4cd71/README.md
- 8: https://deepwiki.com/thu-ml/SageAttention/4-building-and-installation
- 9: SageAttention2.0 is slower VS Flash attention 2 thu-ml/SageAttention#161
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Find the attention flags reference in the docs.
rg -n --hidden --glob '*.mdx' --glob '*.md' 'use-flash-attention|sageattention|attention' development installation docs . || trueRepository: Comfy-Org/docs
Length of output: 23471
Document the Windows build constraints for these installs. installation/comfyui_portable_windows.mdx:151-155 makes flash-attn and sageattention look like drop-in portable-Windows installs, but FlashAttention’s Windows support is experimental and both packages need extra build prerequisites, including --no-build-isolation and a matching CUDA/PyTorch toolchain. Pin a tested version or give the exact supported build recipe for this bundle.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@installation/comfyui_portable_windows.mdx` around lines 151 - 155, Update the
FlashAttention and SageAttention installation instructions near the “Install
FlashAttention” and “Install SageAttention” headings to document their Windows
build constraints, including experimental FlashAttention support, required build
prerequisites, the matching CUDA/PyTorch toolchain, and the necessary
--no-build-isolation option. Either pin versions validated for this portable
bundle or provide the exact supported build recipe instead of presenting generic
pip installs.
Source: MCP tools
| After installing, add the corresponding startup flag to your `.bat` file (e.g. `run_nvidia_gpu.bat`) to enable the optimization: | ||
|
|
||
| ```bat | ||
| .\python_embeded\python.exe -s ComfyUI\main.py --use-flash-attention --windows-standalone-build | ||
| ``` | ||
|
|
||
| See the [startup flags reference](/development/comfyui-server/startup-flags#attention) for all attention optimization options. |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
State that the attention flags are mutually exclusive.
Installing both packages is fine, but users must choose either --use-flash-attention or --use-sage-attention; enabling both is rejected by ComfyUI’s argument parser. Add that clarification before the example. (github.com)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@installation/comfyui_portable_windows.mdx` around lines 158 - 164, Update the
attention optimization guidance before the startup command example to state that
--use-flash-attention and --use-sage-attention are mutually exclusive, so users
must enable only one even though both packages may be installed.
Source: MCP tools
09c88a1 to
b61b1cd
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@ja/installation/comfyui_portable_windows.mdx`:
- Around line 156-160: Replace the generic FlashAttention and SageAttention
pip-install commands with documented Windows-compatible installation
instructions, using either matching community wheels or a source-build procedure
that specifies the required Python, PyTorch, CUDA, and build-tool versions.
Apply the same correction in ja/installation/comfyui_portable_windows.mdx lines
156-160, ko/installation/comfyui_portable_windows.mdx lines 160-164, and
zh/installation/comfyui_portable_windows.mdx lines 157-161.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 0038aed4-9c31-4579-abad-0cc334e85d62
📒 Files selected for processing (3)
ja/installation/comfyui_portable_windows.mdxko/installation/comfyui_portable_windows.mdxzh/installation/comfyui_portable_windows.mdx
fce4221 to
1a665ef
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@installation/comfyui_portable_windows.mdx`:
- Around line 148-150: Make the portable-folder navigation reliable by updating
the command and surrounding guidance in
installation/comfyui_portable_windows.mdx (148-150),
ja/installation/comfyui_portable_windows.mdx (153-155),
ko/installation/comfyui_portable_windows.mdx (157-158), and
zh/installation/comfyui_portable_windows.mdx (154-155): instruct users to open
the terminal in the portable folder or use cd /d with the quoted full path to
ComfyUI_windows_portable, and label the English command block as cmd.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 59e6de9f-615b-40b8-b835-6889e86f8d39
📒 Files selected for processing (4)
installation/comfyui_portable_windows.mdxja/installation/comfyui_portable_windows.mdxko/installation/comfyui_portable_windows.mdxzh/installation/comfyui_portable_windows.mdx
1a665ef to
5fb131f
Compare
5fb131f to
3ad258a
Compare
Summary
The portable page did not cover how to use the embedded Python environment (
python_embeded) to install additional packages. This adds a general guide showing how to install any Python package via.\python_embeded\python.exe -m pip install, with zh/ja/ko translations.Changes
Source
Mintlify AI Assistant analytics data (2026-07-18)
Checklist