{% macro model_management(qwen_health={}, lm_status={}, lm_models=[]) %}

GPU Model Management

Control which models are loaded in GPU memory. Only one model type can be loaded at a time.

Qwen3-TTS Server ({{ qwen_health.cuda_available | default('unknown') | lower == 'true' and 'GPU Available' or 'CPU Only' }})

VoiceDesign (1.7B)
Base Clone (1.7B)

LM Studio (LLM)

{{ lm_status.model or 'No model loaded' }} {% if lm_status.instance_id %} ({{ lm_status.instance_id }}) {% endif %} {% if lm_status.context_length %} ctx={{ lm_status.context_length }} {% endif %}
Pipeline GPU Usage Guide
Pipeline Stage → GPU State:
📖 Analysis (BookNLP + LLM profiling) → LM Studio loaded, Qwen unloaded
🎭 Voice Design (generate voice refs) → Qwen VoiceDesign loaded, LM Studio unloaded
✂️ Segmentation (manifests) → Both unloaded
🔊 Generation (TTS synthesis) → Qwen Base loaded, LM Studio unloaded
📦 Export → Both unloaded

Manual controls above override automatic management.
{% endmacro %}