fix: device to send VLM to is found automatically

This commit is contained in:
fracapuano
2025-06-02 11:23:40 +02:00
parent 2d98bf63a7
commit 492b1812dd

View File

@@ -77,7 +77,7 @@ class SmolVLMWithExpertModel(nn.Module):
print(f"Loading {model_id} weights ...")
self.vlm = AutoModelForImageTextToText.from_pretrained(
model_id,
device_map="cuda",
device_map="auto",
torch_dtype="bfloat16",
low_cpu_mem_usage=True,
)