Spaces:
Runtime error
Runtime error
Commit
·
a8635dd
1
Parent(s):
9c16cd6
Update open_flamingo/open_flamingo/src/factory.py
Browse files
open_flamingo/open_flamingo/src/factory.py
CHANGED
@@ -40,7 +40,7 @@ def create_model_and_transforms(
|
|
40 |
)
|
41 |
# set the vision encoder to output the visual features
|
42 |
vision_encoder.visual.output_tokens = True
|
43 |
-
|
44 |
|
45 |
text_tokenizer = AutoTokenizer.from_pretrained(
|
46 |
tokenizer_path,
|
|
|
40 |
)
|
41 |
# set the vision encoder to output the visual features
|
42 |
vision_encoder.visual.output_tokens = True
|
43 |
+
vision_encoder.to(device, dtype=torch.bfloat16) if device > -1 else None
|
44 |
|
45 |
text_tokenizer = AutoTokenizer.from_pretrained(
|
46 |
tokenizer_path,
|