mirror of
https://github.com/vladmandic/automatic
synced 2026-09-20 01:31:13 +02:00
VQA class fix f-statement fix
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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 ''
|
||||
|
||||
Reference in New Issue
Block a user