[diffusion] doc: update ltx2 multi-gpu deployment guide (#24682)
This commit is contained in:
@@ -2,9 +2,11 @@ export const LTXDeployment = () => {
|
||||
const options = {
|
||||
hardware: {
|
||||
name: 'hardware',
|
||||
title: 'Hardware Platform',
|
||||
title: 'Deployment Target',
|
||||
items: [
|
||||
{ id: 'h200', label: 'H200', subtitle: 'Fastest, resident', default: true },
|
||||
{ id: 'h200', label: '1x H200', subtitle: 'resident', default: true },
|
||||
{ id: 'h200-2gpu', label: '2 GPUs', subtitle: 'CFG parallel', default: false },
|
||||
{ id: 'h200-4gpu', label: '4 GPUs', subtitle: 'TP2 + CFG', default: false },
|
||||
{ id: 'standard', label: 'Standard CUDA', subtitle: 'Snapshot mode', default: false },
|
||||
{ id: 'official', label: 'Official Match', subtitle: 'Original switching', default: false },
|
||||
],
|
||||
@@ -113,7 +115,7 @@ export const LTXDeployment = () => {
|
||||
};
|
||||
|
||||
const getDeviceMode = () => {
|
||||
if (values.hardware === 'h200') {
|
||||
if (values.hardware.startsWith('h200')) {
|
||||
return 'resident';
|
||||
}
|
||||
if (values.hardware === 'official') {
|
||||
@@ -122,6 +124,14 @@ export const LTXDeployment = () => {
|
||||
return 'snapshot';
|
||||
};
|
||||
|
||||
const getParallelFlags = () => {
|
||||
const parallelFlagsMap = {
|
||||
'h200-2gpu': ` \\\n --num-gpus 2 \\\n --enable-cfg-parallel`,
|
||||
'h200-4gpu': ` \\\n --num-gpus 4 \\\n --tp-size 2 \\\n --enable-cfg-parallel`,
|
||||
};
|
||||
return parallelFlagsMap[values.hardware] || '';
|
||||
};
|
||||
|
||||
const generateCommand = () => {
|
||||
const config = modelConfigs[values.model];
|
||||
const pipelineClass = config.pipelines[values.pipeline];
|
||||
@@ -130,6 +140,7 @@ export const LTXDeployment = () => {
|
||||
}
|
||||
|
||||
let command = `sglang serve \\\n --model-path ${config.repoId} \\\n --pipeline-class-name ${pipelineClass}`;
|
||||
command += getParallelFlags();
|
||||
if (values.pipeline !== 'one-stage') {
|
||||
command += ` \\\n --ltx2-two-stage-device-mode ${getDeviceMode()}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user