Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
Merge branch 'nightly' into feature/support-for-audio-models
Roland Tannous87f2b2a9db3c
diff --cc studio/backend/utils/models/model_config.pyindex 42f561ca141,5404a198aa6..995ff084cb6--- a/studio/backend/utils/models/model_config.py+++ b/studio/backend/utils/models/model_config.py@@@ -434,36 -422,30 +434,60 @@@ def is_vision_model(model_name: str, hfpass+def is_audio_model(model_name: str) -> Optional[str]:+ """+ Check if a model is a TTS audio model by looking up its YAML config.++ Returns the audio_type string ('snac', 'csm', 'bicodec', 'dac') or None.+ """+ try:+ defaults = load_model_defaults(model_name)+ audio_type = defaults.get('audio_type')+ if audio_type and isinstance(audio_type, str) and audio_type in ('snac', 'csm', 'bicodec', 'dac', 'whisper'):+ logger.info(f"Model {model_name} detected as audio model: audio_type={audio_type}")+ return audio_type+ return None+ except Exception as e:+ logger.debug(f"Could not determine if {model_name} is audio model: {e}")+ return None+++def has_audio_input_model(model_name: str) -> bool:+ """+ Check if a model accepts audio input (ASR/speech understanding) by looking up its YAML config.++ Returns True if the model has 'audio_input: true' in its defaults.+ """+ try:+ defaults = load_model_defaults(model_name)+ return bool(defaults.get('audio_input'))+ except Exception as e:+ logger.debug(f"Could not determine if {model_name} has audio input: {e}")+ return False+ def _is_mmproj(filename: str) -> bool:+ """Check if a GGUF filename is a vision projection (mmproj) file."""+ return "mmproj" in filename.lower()+++ def detect_mmproj_file(path: str) -> Optional[str]:+ """+ Find the mmproj (vision projection) GGUF file in a directory.++ Args:+ path: Directory to search — or a .gguf file (uses its parent dir).++ Returns:+ Full path to the mmproj .gguf file, or None if not found.+ """+ p = Path(path)+ search_dir = p.parent if p.is_file() else p+ if not search_dir.is_dir():+ return None++ for f in search_dir.glob("*.gguf"):+ if _is_mmproj(f.name):+ return str(f.resolve())+ return Nonedef detect_gguf_model(path: str) -> Optional[str]:@@@ -967,10 -941,8 +1000,11 @@@ class ModelConfigis_vision: bool # Is this a vision model?is_lora: bool # Is this a lora adapter?is_gguf: bool = False # Is this a GGUF model?+ is_audio: bool = False # Is this a TTS audio model?+ audio_type: Optional[str] = None # Audio codec type: 'snac', 'csm', 'bicodec', 'dac'+ has_audio_input: bool = False # Accepts audio input (ASR/speech understanding)gguf_file: Optional[str] = None # Full path to the .gguf file (local mode)+ gguf_mmproj_file: Optional[str] = None # Full path to the mmproj .gguf file (vision projection)gguf_hf_repo: Optional[str] = None # HF repo ID for -hf mode (e.g. "unsloth/gemma-3-4b-it-GGUF")gguf_variant: Optional[str] = None # Quantization variant (e.g. "Q4_K_M")base_model: Optional[str] = None # Base model (for LoRAs)