diff --git a/modules/interrogate/vqa.py b/modules/interrogate/vqa.py index ead010828..fcb7464bc 100644 --- a/modules/interrogate/vqa.py +++ b/modules/interrogate/vqa.py @@ -193,6 +193,8 @@ def qwen(question: str, image: Image.Image, repo: str = None, system_prompt: str cls_name = transformers.Qwen2_5_VLForConditionalGeneration elif 'Qwen2-VL' in repo or 'Qwen2VL' in repo: cls_name = transformers.Qwen2VLForConditionalGeneration + else: + cls_name = transformers.AutoModelForCausalLM model = cls_name.from_pretrained( repo, torch_dtype=devices.dtype, diff --git a/scripts/prompt_enhance.py b/scripts/prompt_enhance.py index 5c21fe27d..5c709429d 100644 --- a/scripts/prompt_enhance.py +++ b/scripts/prompt_enhance.py @@ -331,7 +331,7 @@ class Script(scripts_manager.Script): if needs_rgb: current_image = current_image.convert('RGB') - debug_log(f'Prompt enhance: Converted image to RGB mode') + debug_log('Prompt enhance: Converted image to RGB mode') has_system = system is not None and len(system) > 4 mode = 'custom' if has_system else ''