AustingDong
commited on
Commit
·
1c2e418
1
Parent(s):
9a42c30
Update model_utils.py
Browse files- demo/model_utils.py +2 -2
demo/model_utils.py
CHANGED
@@ -123,13 +123,13 @@ class LLaVA_Utils(Model_Utils):
|
|
123 |
# model_path = "llava-hf/llava-v1.6-vicuna-7b-hf"
|
124 |
config = AutoConfig.from_pretrained(model_path)
|
125 |
|
126 |
-
self.vl_gpt =
|
127 |
low_cpu_mem_usage=True,
|
128 |
attn_implementation = 'eager',
|
129 |
output_attentions=True
|
130 |
)
|
131 |
self.vl_gpt, self.dtype, self.cuda_device = set_dtype_device(self.vl_gpt)
|
132 |
-
self.processor =
|
133 |
self.tokenizer = self.processor.tokenizer
|
134 |
|
135 |
return self.vl_gpt, self.tokenizer
|
|
|
123 |
# model_path = "llava-hf/llava-v1.6-vicuna-7b-hf"
|
124 |
config = AutoConfig.from_pretrained(model_path)
|
125 |
|
126 |
+
self.vl_gpt = LlavaForConditionalGeneration.from_pretrained(model_path,
|
127 |
low_cpu_mem_usage=True,
|
128 |
attn_implementation = 'eager',
|
129 |
output_attentions=True
|
130 |
)
|
131 |
self.vl_gpt, self.dtype, self.cuda_device = set_dtype_device(self.vl_gpt)
|
132 |
+
self.processor = AutoProcessor.from_pretrained(model_path)
|
133 |
self.tokenizer = self.processor.tokenizer
|
134 |
|
135 |
return self.vl_gpt, self.tokenizer
|