Documentation

Environment Installation Guide

Install the environment required by a feature in Settings. Check disk space and hardware requirements first; use the troubleshooting steps below if installation fails.

Open Settings → System. Environment dependencies and CUDA inference libraries have separate installation sections. Install what your features need.

Table of Contents


Feature Overview

Choose a CPU or GPU environment, then install Full, Agent, or Speech capabilities as needed. Interrupted downloads can resume using files already downloaded. Check the environment status after installation, then load the required models.


First-Run Guide

On the welcome screen, choose Get started and follow the steps. You can skip the first environment install.

When you install, choose Full, Agent, or Speech for the detected hardware. After an environment is installed, the install button becomes Reinstall.

If web search is unavailable, check the network and confirm that the Agent environment is installed. If installation is incomplete, use Reinstall.


Storage Location and Space Requirements

Installation Location

Environment dependency packages are installed in a persistent path under the system user directory:

Operating SystemPath Example
WindowsC:\Users\<username>\AppData\Local\ModxAI\packages

⚠️ Note: The installation location is on the system drive, please ensure sufficient available space on the system drive.

Space Requirements

Environment TypeMinimum Available SpaceRecommended Available Space
CPU Environment10 GB15 GB
GPU Environment10 GB20 GB

💡 Note:

  • GPU environment needs to download CUDA version of PyTorch, which is larger in size
  • Additional space required if installing optional acceleration libraries (e.g., bitsandbytes)
  • Temporary files during installation will be automatically cleaned up after completion

GPU Detection Standards

The system automatically detects graphics card types, with different support for various GPUs:

NVIDIA Graphics Cards

Detection ItemDetection MethodPass Criteria
GPU ExistsCall nvidia-smiCommand executes successfully and returns GPU information
Driver VersionParse nvidia-smi outputDriver version number is not empty
CUDA VersionCall nvcc --versionReturn CUDA version ≥ 11.8
VRAM SizeParse nvidia-smi outputFor display only, does not affect installation

AMD Graphics Cards

Detection ItemDetection MethodDescription
GPU ExistsRead Windows registry or WMIDetect Radeon series discrete GPUs
VRAM SizeRead AdapterRAMFor display only

⚠️ AMD GPU Limitations:

  • On Windows platform, AMD GPU currently has no official ROCm support
  • When selecting GPU environment, will automatically fall back to CPU version of PyTorch
  • AMD GPU users are recommended to directly select CPU environment, but this does not affect inference acceleration

No Discrete GPU

If the system does not detect a discrete GPU (only integrated GPU or no GPU):

  • GPU option will be disabled
  • Only CPU environment can be installed
  • Features that support CPU execution are available, but inference and training may be slower

NVIDIA Driver and CUDA Configuration

⚠️ Important Notice: The environment installation feature does not automatically install NVIDIA drivers and CUDA Toolkit, users need to configure them manually.

Driver Requirements

ComponentMinimum VersionRecommended VersionDownload Link
NVIDIA Driver450.80+Latest stableNVIDIA Driver Download
CUDA Toolkit11.812.0-12.9CUDA Download
cuDNN (Optional)8.6+8.9+cuDNN Download (requires account registration)

CUDA Version Mapping

The system automatically selects the appropriate PyTorch version based on the detected CUDA version:

Local CUDA VersionInstalled PyTorch Version
CUDA 11.7 and belowFall back to CUDA 11.8 version
CUDA 11.8PyTorch + CUDA 11.8
CUDA 12.1PyTorch + CUDA 12.1
CUDA 12.4PyTorch + CUDA 12.4
CUDA 12.6PyTorch + CUDA 12.6
CUDA 12.8+PyTorch + CUDA 12.8

cuDNN Acceleration (Optional)

cuDNN is NVIDIA's deep learning acceleration library that can significantly improve training and inference speed:

  • Installation Recommendation: Strongly recommended if performing model training and audio processing
  • Version Selection: Choose cuDNN matching your CUDA version (e.g., CUDA 12.x with cuDNN 9.x)
  • Installation Method: After downloading and extracting, copy contents of bin, include, and lib directories to CUDA installation directory

Verify CUDA Installation

Execute the following commands in command line to verify:

# Check NVIDIA driver nvidia-smi # Check CUDA version nvcc --version

If the command fails or reports "command not found", it means the driver or CUDA is not correctly installed or not added to system PATH.


Environment Type Selection

CPU Environment

Use CaseDescription
No Discrete GPUDevices with integrated GPU or no GPU
AMD GPUWindows platform AMD GPU does not support training GPU acceleration yet, but supports inference
Light UsageOnly small-scale data processing or inference testing
Development/DebuggingFeature verification without performance requirements

Characteristics:

  • Smaller download size (approximately 2-3 GB)
  • No CUDA environment dependency
  • Features that support CPU execution are available, but may be slower

GPU Environment

Use CaseDescription
NVIDIA GPUHas NVIDIA discrete GPU with CUDA installed
Model TrainingTraining tasks requiring GPU acceleration
Large-Scale InferenceBatch processing or real-time inference scenarios
Performance PriorityPursuit of optimal processing speed

Characteristics:

  • Larger download size (approximately 4-6 GB, including CUDA version PyTorch)
  • Requires correctly configured NVIDIA driver and CUDA
  • Training speed improvement of 10-100x (depending on GPU performance)

Environment Mutual Exclusion

⚠️ Important: CPU environment and GPU environment cannot be installed simultaneously, they are mutually exclusive.

  • Before switching environment type, need to clean the currently installed environment first
  • If another environment is detected, the install button will be disabled
  • Interface will prompt "Environment conflict detected", guiding users to clean first

Installation Capability

In addition to the environment type (CPU/GPU), you also need to select the installation capability to determine which dependency components are installed:

CapabilityContentsUse Case
All(Recommend)Dependencies for training, agent tools, code analysis, and TTSUsers who need all features
Code AnalysisCode parsing resourcesUsers of the CODE workspace
AgentCore libraries + Playwright browser environment + Bun runtimeUsers who only need agent web browsing and web tools
Voice SynthesisCore libraries + misaki G2P + spaCy modelsUsers who only need TTS speech synthesis

The installation capability can be switched in the installation confirmation dialog. Different capabilities install different dependency packages; choosing the appropriate one saves disk space and installation time.


Installation Content Details

Portable Python

ComponentVersionDescription
Python3.11.9Windows embeddable version, completely independent
pipLatestPackage management tool

The app can reuse a compatible runtime or set up the required components when needed. Keep it online during first-time setup or when resources are missing. You do not need to install system Python separately.

Core Dependencies

Install corresponding versions of core libraries based on environment type:

Library NameCPU VersionGPU VersionPurpose
PyTorchtorch (CPU)torch + CUDADeep learning framework
torchvisionCPU versionCUDA versionImage processing
torchaudioCPU versionCUDA versionAudio processing

Base Feature Libraries

The following base libraries will be installed regardless of CPU or GPU environment selection:

Library NameVersionPurpose
transformers4.52+Hugging Face model library
sentence-transformers4.0+Vector model inference
trl0.15+Reinforcement learning training
peft0.15+Efficient fine-tuning (LoRA, etc.)
sentencepiece0.2+Tokenizer
faster-whisper1.2+Speech recognition
pandas2.3+Data processing
matplotlib3.10+Chart plotting
jieba0.42+Chinese word segmentation
spacy3.8+NLP processing
markitdown0.1+Markdown parsing
mistral_common1.8+Mistral model support

Agent Environment Dependencies

When selecting "Full" or "Agent" installation capability, the following agent-specific dependencies are additionally installed:

ComponentPurposeDescription
PlaywrightBrowser automationRuntime for the agent's web browsing tool
BunJS/TypeScript runtimeExecution engine for the agent's web tools

⚠️ Prerequisite for Agent Browser and Web Tools: "Full" or "Agent" installation capability must be installed. If only "Voice Synthesis" capability is installed, the agent's browser-related tools will be unavailable.

Optional Acceleration Libraries (GPU Environment)

GPU environment installation will asynchronously attempt to install the following optional libraries, failure does not affect main process:

Library NamePurposeDescription
bitsandbytes4/8-bit quantizationReduce VRAM usage, accelerate training

TTS Dependencies

TTS (Text-to-Speech) feature requires the following dependencies. The installation method varies depending on the selected capability:

Library NamePurposeDescription
misaki[en,zh]G2P conversionGrapheme-to-Phoneme conversion, supports Chinese and English

Full Mode (Async Installation):

  • misaki and spaCy models are downloaded in the background after the main environment completes.
  • After installation, wait a moment and refresh the environment status to confirm TTS capability availability.
  • Async download failure does not affect the main environment installation success status.

Voice Synthesis Mode (Sync Installation):

  • misaki and spaCy models are installed synchronously during the main process, until completion or failure.
  • Suitable for fixing TTS dependencies independently after async download failure.
  • After installation, refresh immediately to confirm status.

⚠️ TTS Dependency Installation Notes:

  • misaki library is forcibly installed from PyPI official source, as domestic mirror sources have incomplete extras dependency resolution
  • Users in Chinese mainland may experience slow downloads or failures, please maintain stable network connection
  • Async installation failure does not affect main environment; can fix by switching to "Voice Synthesis" mode for independent reinstall
  • After successful installation, refresh environment status to confirm if TTS capability is available

Optional Model Resources

After installation completion, the following model resources will be downloaded asynchronously:

ResourceSizePurpose
en_core_web_sm~14 MBspaCy English model (NLP processing, TTS English G2P)
zh_core_web_sm~75 MBspaCy Chinese model (Chinese segmentation, TTS Chinese G2P)

💡 Note:

  • Model resource download failure does not affect environment installation status, you can try downloading again when using related features later.
  • TTS Feature Dependency: TTS speech synthesis feature requires spaCy models for G2P conversion
  • Asynchronous Download Delay: These models are downloaded asynchronously after main environment installation completes, download time depends on network conditions and may be delayed by tens of seconds to several minutes
  • Capability Status: After main environment installation completes, please refresh environment status to confirm if various capabilities (including TTS) are available
  • If TTS capability shows as unavailable, can try restart application or repair installation to download related dependencies again

Operation Instructions

Refresh

Clicking the Refresh button executes the following operations:

  1. Re-detect system hardware information (CPU, memory, GPU)
  2. Re-detect NVIDIA driver and CUDA version
  3. Re-detect installed dependency package status
  4. Run verification script to confirm environment availability

⚠️ Note: First refresh or refresh after environment changes may be slow (10-30 seconds) because verification scripts need to be executed to check versions and CUDA support status of various libraries.

Install

Click the Install button to start the installation process:

  1. Confirm installation (confirmation dialog displays selected mirror source)
  2. Display progress bar and real-time installation logs
  3. Automatically refresh environment status after installation completion
  4. If the app says Please restart the app to finish switching environments, quit and reopen it, then refresh the environment status to confirm success. No further restart is needed once the installation shows as successful.

⚠️ Note: Try to maintain stable network connection during installation to avoid interruption. Unless necessary, do not manually stop installation.

Reinstall

If environment is already installed, the install button will change to Reinstall:

  • Reinstall will overwrite existing environment
  • Suitable for damaged environment or need to update dependency versions

Clean

Clicking the Clean button will delete the installed environment:

  1. Confirm cleaning (confirmation dialog pops up)
  2. Delete all dependencies in packages directory

⚠️ Clean Failure Handling:

If cleaning prompts "File in use" or "Clean failed", this is usually because some libraries (like PyTorch) have been loaded by the current process.

Solution:

  • Click the "Restart" button to restart the application
  • Execute clean operation again after restart
  • Can only switch to another environment type after cleaning is complete

Stop Installation

During installation, you can click the Stop Installation button to interrupt:

  • Downloaded packages will be retained and can be reused in next installation
  • Environment status will be marked as "failed" after stopping
  • Can restart installation at any time

Installation Process Details

The complete installation process includes the following stages:

Start → Prepare Portable Python → Pre-clean Check → Install Training Environment → Install Acceleration Libraries (Optional) → Install Base Dependencies → Download Models (Optional) → Verify Environment → Complete

Stage Descriptions

StageDescriptionEstimated Time
prepare_portable_pythonDownload/extract portable Python1-5 minutes
precleanCheck and clean incompatible old environments< 1 minute
training_requirementsInstall PyTorch and other training core libraries5-20 minutes
accelerate_optionalAsynchronously install optional acceleration librariesBackground process
base_requirementsInstall transformers and other base libraries3-10 minutes
download_modelsAsynchronously download spaCy modelsBackground process
verifyVerify environment integrity1-2 minutes
finalizeRefresh status and complete< 1 minute

💡 Time Note: Actual installation time depends on network speed and selected mirror source. Users in Chinese mainland are recommended to select (Alibaba Cloud/Tencent Cloud) mirror sources which are usually faster.


Troubleshooting

Common Issues

1. Installation Failed: Network Timeout

Symptom: Download failure or timeout prompt during installation

Solution:

  • Switch mirror source
  • Check network connection, ensure external network access
  • Retry after disabling VPN or proxy software
  • Click "Install" to retry, downloaded files will be reused

2. Installation Failed: Insufficient Disk Space

Symptom: Insufficient disk space prompt

Solution:

  • Clean temporary files on system drive (C drive)
  • Ensure at least 10 GB available space
  • Uninstall unnecessary software to free up space

3. GPU Environment Detected as CPU After Installation

Symptom: After installing GPU environment, torch.cuda.is_available() returns False

Possible Causes:

  • CUDA not correctly installed
  • CUDA version does not match PyTorch version
  • NVIDIA driver version too low

Solution:

  1. Execute nvidia-smi in command line to confirm driver is normal
  2. Execute nvcc --version to confirm CUDA is installed
  3. If CUDA version is too low, upgrade to 11.8 or higher
  4. Clean current environment and reinstall

4. Clean Failed: File in Use

Symptom: "Some files may be occupied by the system" prompt during cleaning

Solution:

  • Click "Restart" button to restart application
  • Execute clean operation immediately after restart
  • If still fails, manually restart computer and try again

5. Slow Refresh

Symptom: Long wait after clicking refresh

Cause: First refresh needs to execute verification script to check versions and CUDA support status of various libraries

Note: This is normal behavior, subsequent refreshes will use cache and speed will be significantly faster

6. Environment Conflict Prompt

Symptom: "Core packages of another environment detected" prompt

Solution:

  1. First click "Clean" to delete current environment
  2. If cleaning fails, restart application and clean again
  3. Install target environment after successful cleaning

Installation Logs

Installation logs are displayed in real-time in the progress card:

  • Expand "Installation Log" to view detailed information
  • Log content can help locate specific causes of installation failure
  • Please provide complete installation logs if technical support is needed