VQA class fix f-statement fix

This commit is contained in:
CalamitousFelicitousness
2025-10-26 06:39:05 +00:00
parent 1ac4214379
commit 33f335a98c
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -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,
+1 -1
View File
@@ -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 ''