- 16 Mar, 2026 15 commits
-
-
Your Name authored
- Directly set chat_template to known template names (qwen3, qwen, llama3, etc.) instead of trying to load non-existent HuggingFace tokenizers - Add use_manual condition to use manual formatting when chat_template is set but hf_tokenizer is None (applies to both generate_chat and generate_chat_stream) - This ensures GGUF models loaded from URLs with known templates use proper <|im_start|> formatting instead of failing on create_chat_completion
-
Your Name authored
When HF tokenizer loading fails, try known template names based on model name: - Qwen models: try qwen3, qwen templates - Llama models: try llama3, llama templates - Phi models: try phi template - Mistral models: try mistral template This helps when the tokenizer can't be loaded but we know the model family.
-
Your Name authored
The model_backend_types attribute was not being initialized properly due to incorrect indentation, causing 'MultiModelManager' object has no attribute 'model_backend_types' error when trying to load models on-demand.
-
Your Name authored
- Add uppercase quantization suffixes (_Q4_K_M, etc.) to handle cached GGUF filenames - Add progressive fallback to try shorter model names when tokenizer loading fails - Example: Qwen3.5-27B-Uncensored-HauhauCS-Aggressive -> try Qwen3.5-27B-Uncensored -> Qwen3.5-27B -> Qwen3.5 -> Qwen - Add warning when all tokenizer loading attempts fail (will use manual formatting instead)
-
Your Name authored
-
Your Name authored
-
Your Name authored
-
Your Name authored
-
Your Name authored
-
Your Name authored
-
Your Name authored
- Added _aggressive_vram_cleanup method to properly clear VRAM - Moves model to CPU before deletion - Deletes pipeline, vae, text_encoder, tokenizer explicitly - Multiple rounds of gc.collect() - Uses torch.cuda.synchronize() before clearing cache - Increased delay to 5 seconds after cleanup
-
Your Name authored
-
Your Name authored
- Now can specify template directly: --hf-chat-template "model:template" - Updated check_hf_chat_template to return tuple (should_use, template_name) - Updated _load_huggingface_tokenizer to accept template_name parameter - Updated README with new syntax and template examples
-
Your Name authored
- Added 'auto' as a valid value for --hf-chat-template - When --hf-chat-template auto is used, it auto-detects and applies HF template to all models - Updated README with new syntax
-
Your Name authored
-
- 15 Mar, 2026 25 commits
-
-
Your Name authored
- Changed --hf-chat-template from boolean to action=append - Added check_hf_chat_template() function for model-specific checking - Updated _finalize_chat_template_detection to use new function - Updated README with new syntax
-
Your Name authored
- Added --hf-chat-template CLI flag to use transformers apply_chat_template - Added _load_huggingface_tokenizer() to load HF tokenizer for GGUF models - Added _format_messages_hf() method for HF chat template formatting - Updated generate_chat and generate_chat_stream to use HF tokenizer when available - Updated format_messages to check for HF tokenizer first - Added documentation in README.md
-
Your Name authored
- Added --reply-filters CLI flag to make content filtering optional - Supports comma-separated values: --reply-filters malformed,tool_calls - Supports model-specific filters: --reply-filters text:malformed --reply-filters image:tool_calls - Supports specific model names: --reply-filters text:llama-3.1:malformed - Added check_reply_filter() and check_single_filter() helper functions - Updated stream_chat_response and generate_chat_response to use new filtering - Updated ToolCallParser._filter_malformed_content for conditional filtering - Added documentation in README.md
-
Your Name authored
- Give more time for Vulkan memory to be freed after unloading image models
-
Your Name authored
- Add garbage collection and torch.cuda.empty_cache() after unloading image models - Add a small delay to allow VRAM to be freed before loading new model - This should help prevent OOM errors when switching between image and text models
-
Your Name authored
- Remove stripping in strip_tool_calls_from_content function - Whitespace (spaces, newlines) are valid content and should be preserved
-
Your Name authored
- When reloading a default model that was loaded from a URL, check for cached file path and use it instead of the URL
-
Your Name authored
- Replace NaN and Inf values with valid values before saving - Clip image values to valid range [0, 1] to prevent black images
-
Your Name authored
- When 'default' model is requested but not loaded (was unloaded for image model), the code now tries to reload the default model - Cleanup image models first to free VRAM, then reload the text model
-
Your Name authored
- Add --image-cpu-offload CLI flag for explicit sequential CPU offload - Enable sequential CPU offload only on 3rd OOM retry or when --image-cpu-offload is set
-
Your Name authored
- Skip URLs when listing the default model in list_models() - This prevents download URLs from appearing in available models list
-
Your Name authored
- Enable sequential CPU offload if --offload-strategy or --offload-dir is specified - Add retry logic: on OOM, retry with attention_slicing, then with sequential_offload - Clear CUDA cache between retry attempts
-
Your Name authored
- Add --image-precision with choices: bf16, f32, f16, f8 - bf16 recommended for modern GPUs (RTX 30/40 series) to avoid NaN issues - Enable VAE tiling for diffusers when --vae-tiling is specified
-
Your Name authored
- Changed torch_dtype from float16 (when CUDA available) to float32 - This prevents NaN/Infinity values in image output that cause black/corrupted images - FP16 can cause numerical overflow on some models like SDXL
-
Your Name authored
- Add 'steps' parameter to ImageGenerationRequest (overrides quality-based default) - Add 'guidance_scale' parameter to ImageGenerationRequest (overrides CLI --image-cfg-scale) - Use request values in diffusers pipeline call
-
Your Name authored
- Import time module inside try block with alias to avoid UnboundLocalError - This prevents Python's exception handling from affecting variable scope
-
Your Name authored
- Remove duplicate 'image' entry in list_models() - Remove vision: alias (user doesn't want it) - Skip URLs in loaded models listing (they're download sources) - Add full traceback to diffusers error for debugging
-
Your Name authored
- Recursively scan huggingface cache directory (hub/, xet/, etc.) - Also fix remove-model to search recursively in huggingface cache
-
Your Name authored
- Add get_all_cache_dirs() to find GGUF, HuggingFace, and Diffusers caches - Update --list-cached-models to show all cache locations - Update --remove-all-models to clean all cache directories - Update --remove-model to search across all caches - Add better error handling for diffusers image extraction
-
Your Name authored
- When --file-path is set and --url is 'auto', use the Host header from the request (what the client used to connect) instead of the client's IP address - This ensures the returned URL points to the correct server
-
Your Name authored
- Remove debug print for empty filtered chunks - Fix strip_tool_calls_from_content to preserve whitespace-only chunks ('\n\n', ' ') - These whitespace characters are essential for proper message composition -
Your Name authored
- Changed context arguments to use action='append' allowing multiple values - Added get_ctx_by_index() helper function for index-based context retrieval - Updated text, audio, and image model loading to use indexed context values - Users can now specify different context sizes per model
-
Your Name authored
- Cleanup image models before loading text models to prevent OOM errors - Applied to both text model loading paths in get_model_for_request
-
Your Name authored
- Cleanup any existing models (text, audio, etc.) from VRAM before loading image models to prevent out of memory errors when switching between model types - Applied to both diffusers and stable-diffusion-cpp loading paths
-
Your Name authored
- Add fallback to use configured --image-model when unknown model name is sent - Cache dynamically loaded StableDiffusion models for reuse across requests - Always check cache (not just in loadall mode) so ondemand mode reuses models
-