编译安装basalt

编译安装python 3.13.18

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64
export CUDA_HOME=/usr/local/cuda/
export PATH=$PATH:/usr/local/cuda/bin

cd basalt-0.3.2
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j

source /data/D/comfyui_venv/bin/activate
pip install -r requirements.txt
#hf download jesdga/Qwen3.8-Flash-Next-Basalt Qwen3.8-FN-NVFP4-DQ6_K.basalt --local-dir models
下载模型到models目录:
https://huggingface.co/jesdga/Qwen3.8-Flash-Next-Basalt/blob/main/Qwen3.8-FN-NVFP4-DQ8.basalt

vi basalt_config.json
{
  "version": 2,
  "models": [{ "model": "/data/E/Qwen3.8-FN-NVFP4-DQ8.basalt", "gpu": "0", "kv": "int8", "fit-max-tokens": true, "reasoning-budget-tokens": 16000, "max-context": 262144, "alias": "deepseek-v4-pro-2" }],
  "engine": { "resident-experts": true, "vision": "cpu", "spec": 4 },
  "server": { "host": "0.0.0.0", "port": 8099 }
}
bin/basalt serve --config basalt_config.json