From 22ea3dd620693480ecaec942918d7c42167f054b Mon Sep 17 00:00:00 2001 From: Jaret Burkett Date: Thu, 16 Apr 2026 21:09:52 +0000 Subject: [PATCH 1/2] Fixed issue on some systems where Logger didnt have atty --- toolkit/print.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/toolkit/print.py b/toolkit/print.py index e0f6c23b..4d26d243 100644 --- a/toolkit/print.py +++ b/toolkit/print.py @@ -21,6 +21,9 @@ class Logger: def flush(self): self.terminal.flush() self.log.flush() + + def isatty(self): + return self.terminal.isatty() def setup_log_to_file(filename): From a513a1583e64cffad0ef5cd63b55ff3a5a4c6f99 Mon Sep 17 00:00:00 2001 From: Jaret Burkett Date: Thu, 16 Apr 2026 21:24:43 +0000 Subject: [PATCH 2/2] Fixed issue where Qwen VL MOE captioner produced nonsense --- extensions_built_in/captioner/Qwen3VLCaptioner.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/extensions_built_in/captioner/Qwen3VLCaptioner.py b/extensions_built_in/captioner/Qwen3VLCaptioner.py index 9c76f223..61209b8b 100644 --- a/extensions_built_in/captioner/Qwen3VLCaptioner.py +++ b/extensions_built_in/captioner/Qwen3VLCaptioner.py @@ -1,4 +1,8 @@ -from transformers import Qwen3VLForConditionalGeneration, AutoProcessor +from transformers import ( + Qwen3VLForConditionalGeneration, + Qwen3VLMoeForConditionalGeneration, + AutoProcessor, +) from collections import OrderedDict from optimum.quanto import freeze @@ -21,7 +25,12 @@ class Qwen3VLCaptioner(BaseCaptioner): def load_model(self): self.print_and_status_update("Loading Qwen3VL model") - self.model = Qwen3VLForConditionalGeneration.from_pretrained( + ModelClass = ( + Qwen3VLMoeForConditionalGeneration + if "B-A" in self.caption_config.model_name_or_path + else Qwen3VLForConditionalGeneration + ) + self.model = ModelClass.from_pretrained( self.caption_config.model_name_or_path, dtype=self.torch_dtype, device_map="cpu",