debug
Browse files- app.py +4 -1
- llava/__pycache__/__init__.cpython-310.pyc +0 -0
- llava/__pycache__/constants.cpython-310.pyc +0 -0
- llava/__pycache__/conversation.cpython-310.pyc +0 -0
- llava/__pycache__/mm_utils.cpython-310.pyc +0 -0
- llava/__pycache__/utils.cpython-310.pyc +0 -0
- llava/model/__pycache__/__init__.cpython-310.pyc +0 -0
- llava/model/__pycache__/builder.cpython-310.pyc +0 -0
- llava/model/__pycache__/llava_arch.cpython-310.pyc +0 -0
- llava/model/builder.py +2 -2
- llava/model/language_model/__pycache__/llava_llama.cpython-310.pyc +0 -0
- llava/model/language_model/__pycache__/llava_mistral.cpython-310.pyc +0 -0
- llava/model/language_model/__pycache__/llava_mpt.cpython-310.pyc +0 -0
- llava/model/multimodal_encoder/__pycache__/builder.cpython-310.pyc +0 -0
- llava/model/multimodal_encoder/__pycache__/clip_encoder.cpython-310.pyc +0 -0
- llava/model/multimodal_encoder/__pycache__/imagebind.cpython-310.pyc +0 -0
- llava/model/multimodal_encoder/__pycache__/open_clip_encoder.cpython-310.pyc +0 -0
- llava/model/multimodal_encoder/__pycache__/siglip_encoder.cpython-310.pyc +0 -0
- llava/model/multimodal_encoder/dev_eva_clip/__pycache__/eva_vit.cpython-310.pyc +0 -0
- llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/__init__.cpython-310.pyc +0 -0
- llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/constants.cpython-310.pyc +0 -0
- llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/eva_vit_model.cpython-310.pyc +0 -0
- llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/factory.cpython-310.pyc +0 -0
- llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/hf_configs.cpython-310.pyc +0 -0
- llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/hf_model.cpython-310.pyc +0 -0
- llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/loss.cpython-310.pyc +0 -0
- llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/model.cpython-310.pyc +0 -0
- llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/modified_resnet.cpython-310.pyc +0 -0
- llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/openai.cpython-310.pyc +0 -0
- llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/pretrained.cpython-310.pyc +0 -0
- llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/rope.cpython-310.pyc +0 -0
- llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/timm_model.cpython-310.pyc +0 -0
- llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/tokenizer.cpython-310.pyc +0 -0
- llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/transform.cpython-310.pyc +0 -0
- llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/transformer.cpython-310.pyc +0 -0
- llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/utils.cpython-310.pyc +0 -0
- llava/model/multimodal_encoder/eva_clip/__pycache__/eva_clip_encoder.cpython-310.pyc +0 -0
- llava/model/multimodal_encoder/eva_clip/__pycache__/eva_clip_processors.cpython-310.pyc +0 -0
- llava/model/multimodal_encoder/eva_clip/__pycache__/eva_vit.cpython-310.pyc +0 -0
- llava/model/multimodal_encoder/eva_clip/__pycache__/factory.cpython-310.pyc +0 -0
- llava/model/multimodal_projector/__pycache__/builder.cpython-310.pyc +0 -0
- llava/train/__pycache__/llava_trainer.cpython-310.pyc +0 -0
- llava/train/__pycache__/train.cpython-310.pyc +0 -0
app.py
CHANGED
@@ -38,7 +38,7 @@ argparser.add_argument("--model-base", type=str, default=None)
|
|
38 |
argparser.add_argument("--num-gpus", type=int, default=1)
|
39 |
argparser.add_argument("--conv-mode", type=str, default="plain")
|
40 |
argparser.add_argument("--temperature", type=float, default=0.2)
|
41 |
-
argparser.add_argument("--max-new-tokens", type=int, default=
|
42 |
argparser.add_argument("--num_frames", type=int, default=16)
|
43 |
argparser.add_argument("--load-8bit", action="store_true")
|
44 |
argparser.add_argument("--load-4bit", action="store_true")
|
@@ -49,6 +49,7 @@ model_path = args.model_path
|
|
49 |
conv_mode = args.conv_mode
|
50 |
filt_invalid="cut"
|
51 |
model_name = get_model_name_from_path(args.model_path)
|
|
|
52 |
model_kwargs = {
|
53 |
"use_cache": False,
|
54 |
"trust_remote_code": True,
|
@@ -130,6 +131,7 @@ def generate(state, imagebox, textbox, image_process_mode, temperature, top_p, m
|
|
130 |
images = None
|
131 |
image_sizes = None
|
132 |
image_args = {"images": images, "image_sizes": image_sizes}
|
|
|
133 |
else:
|
134 |
images = None
|
135 |
image_args = {}
|
@@ -140,6 +142,7 @@ def generate(state, imagebox, textbox, image_process_mode, temperature, top_p, m
|
|
140 |
stop_str = state.sep if state.sep_style in [SeparatorStyle.SINGLE, SeparatorStyle.MPT] else state.sep2
|
141 |
|
142 |
input_ids = tokenizer_image_token(prompt, tokenizer, IMAGE_TOKEN_IDX, return_tensors='pt').unsqueeze(0).to(model.device)
|
|
|
143 |
streamer = TextIteratorStreamer(tokenizer, skip_prompt=True, skip_special_tokens=True, timeout=15)
|
144 |
|
145 |
max_new_tokens = min(max_new_tokens, max_context_length - input_ids.shape[-1] - num_image_tokens)
|
|
|
38 |
argparser.add_argument("--num-gpus", type=int, default=1)
|
39 |
argparser.add_argument("--conv-mode", type=str, default="plain")
|
40 |
argparser.add_argument("--temperature", type=float, default=0.2)
|
41 |
+
argparser.add_argument("--max-new-tokens", type=int, default=64)
|
42 |
argparser.add_argument("--num_frames", type=int, default=16)
|
43 |
argparser.add_argument("--load-8bit", action="store_true")
|
44 |
argparser.add_argument("--load-4bit", action="store_true")
|
|
|
49 |
conv_mode = args.conv_mode
|
50 |
filt_invalid="cut"
|
51 |
model_name = get_model_name_from_path(args.model_path)
|
52 |
+
model_name = 'clip-evaclip-und-gen-pretrain'
|
53 |
model_kwargs = {
|
54 |
"use_cache": False,
|
55 |
"trust_remote_code": True,
|
|
|
131 |
images = None
|
132 |
image_sizes = None
|
133 |
image_args = {"images": images, "image_sizes": image_sizes}
|
134 |
+
print(image_args)
|
135 |
else:
|
136 |
images = None
|
137 |
image_args = {}
|
|
|
142 |
stop_str = state.sep if state.sep_style in [SeparatorStyle.SINGLE, SeparatorStyle.MPT] else state.sep2
|
143 |
|
144 |
input_ids = tokenizer_image_token(prompt, tokenizer, IMAGE_TOKEN_IDX, return_tensors='pt').unsqueeze(0).to(model.device)
|
145 |
+
print(input_ids)
|
146 |
streamer = TextIteratorStreamer(tokenizer, skip_prompt=True, skip_special_tokens=True, timeout=15)
|
147 |
|
148 |
max_new_tokens = min(max_new_tokens, max_context_length - input_ids.shape[-1] - num_image_tokens)
|
llava/__pycache__/__init__.cpython-310.pyc
CHANGED
Binary files a/llava/__pycache__/__init__.cpython-310.pyc and b/llava/__pycache__/__init__.cpython-310.pyc differ
|
|
llava/__pycache__/constants.cpython-310.pyc
CHANGED
Binary files a/llava/__pycache__/constants.cpython-310.pyc and b/llava/__pycache__/constants.cpython-310.pyc differ
|
|
llava/__pycache__/conversation.cpython-310.pyc
CHANGED
Binary files a/llava/__pycache__/conversation.cpython-310.pyc and b/llava/__pycache__/conversation.cpython-310.pyc differ
|
|
llava/__pycache__/mm_utils.cpython-310.pyc
CHANGED
Binary files a/llava/__pycache__/mm_utils.cpython-310.pyc and b/llava/__pycache__/mm_utils.cpython-310.pyc differ
|
|
llava/__pycache__/utils.cpython-310.pyc
CHANGED
Binary files a/llava/__pycache__/utils.cpython-310.pyc and b/llava/__pycache__/utils.cpython-310.pyc differ
|
|
llava/model/__pycache__/__init__.cpython-310.pyc
CHANGED
Binary files a/llava/model/__pycache__/__init__.cpython-310.pyc and b/llava/model/__pycache__/__init__.cpython-310.pyc differ
|
|
llava/model/__pycache__/builder.cpython-310.pyc
CHANGED
Binary files a/llava/model/__pycache__/builder.cpython-310.pyc and b/llava/model/__pycache__/builder.cpython-310.pyc differ
|
|
llava/model/__pycache__/llava_arch.cpython-310.pyc
CHANGED
Binary files a/llava/model/__pycache__/llava_arch.cpython-310.pyc and b/llava/model/__pycache__/llava_arch.cpython-310.pyc differ
|
|
llava/model/builder.py
CHANGED
@@ -48,7 +48,7 @@ def load_pretrained_model(model_path, model_base, model_name, load_8bit=False, l
|
|
48 |
if use_flash_attn:
|
49 |
kwargs['attn_implementation'] = 'flash_attention_2'
|
50 |
|
51 |
-
if '
|
52 |
# Load LLaVA model
|
53 |
if 'lora' in model_name.lower() and model_base is None:
|
54 |
warnings.warn('There is `lora` in model name but no `model_base` is provided. If you are loading a LoRA model, please provide the `model_base` argument. Detailed instruction: https://github.com/haotian-liu/LLaVA#launch-a-model-worker-lora-weights-unmerged.')
|
@@ -157,7 +157,7 @@ def load_pretrained_model(model_path, model_base, model_name, load_8bit=False, l
|
|
157 |
|
158 |
image_processor = None
|
159 |
|
160 |
-
if '
|
161 |
mm_use_im_start_end = getattr(model.config, "mm_use_im_start_end", False)
|
162 |
mm_use_im_patch_token = getattr(model.config, "mm_use_im_patch_token", True)
|
163 |
if mm_use_im_patch_token:
|
|
|
48 |
if use_flash_attn:
|
49 |
kwargs['attn_implementation'] = 'flash_attention_2'
|
50 |
|
51 |
+
if 'und' in model_name.lower():
|
52 |
# Load LLaVA model
|
53 |
if 'lora' in model_name.lower() and model_base is None:
|
54 |
warnings.warn('There is `lora` in model name but no `model_base` is provided. If you are loading a LoRA model, please provide the `model_base` argument. Detailed instruction: https://github.com/haotian-liu/LLaVA#launch-a-model-worker-lora-weights-unmerged.')
|
|
|
157 |
|
158 |
image_processor = None
|
159 |
|
160 |
+
if 'und' in model_name.lower():
|
161 |
mm_use_im_start_end = getattr(model.config, "mm_use_im_start_end", False)
|
162 |
mm_use_im_patch_token = getattr(model.config, "mm_use_im_patch_token", True)
|
163 |
if mm_use_im_patch_token:
|
llava/model/language_model/__pycache__/llava_llama.cpython-310.pyc
CHANGED
Binary files a/llava/model/language_model/__pycache__/llava_llama.cpython-310.pyc and b/llava/model/language_model/__pycache__/llava_llama.cpython-310.pyc differ
|
|
llava/model/language_model/__pycache__/llava_mistral.cpython-310.pyc
CHANGED
Binary files a/llava/model/language_model/__pycache__/llava_mistral.cpython-310.pyc and b/llava/model/language_model/__pycache__/llava_mistral.cpython-310.pyc differ
|
|
llava/model/language_model/__pycache__/llava_mpt.cpython-310.pyc
CHANGED
Binary files a/llava/model/language_model/__pycache__/llava_mpt.cpython-310.pyc and b/llava/model/language_model/__pycache__/llava_mpt.cpython-310.pyc differ
|
|
llava/model/multimodal_encoder/__pycache__/builder.cpython-310.pyc
CHANGED
Binary files a/llava/model/multimodal_encoder/__pycache__/builder.cpython-310.pyc and b/llava/model/multimodal_encoder/__pycache__/builder.cpython-310.pyc differ
|
|
llava/model/multimodal_encoder/__pycache__/clip_encoder.cpython-310.pyc
CHANGED
Binary files a/llava/model/multimodal_encoder/__pycache__/clip_encoder.cpython-310.pyc and b/llava/model/multimodal_encoder/__pycache__/clip_encoder.cpython-310.pyc differ
|
|
llava/model/multimodal_encoder/__pycache__/imagebind.cpython-310.pyc
CHANGED
Binary files a/llava/model/multimodal_encoder/__pycache__/imagebind.cpython-310.pyc and b/llava/model/multimodal_encoder/__pycache__/imagebind.cpython-310.pyc differ
|
|
llava/model/multimodal_encoder/__pycache__/open_clip_encoder.cpython-310.pyc
CHANGED
Binary files a/llava/model/multimodal_encoder/__pycache__/open_clip_encoder.cpython-310.pyc and b/llava/model/multimodal_encoder/__pycache__/open_clip_encoder.cpython-310.pyc differ
|
|
llava/model/multimodal_encoder/__pycache__/siglip_encoder.cpython-310.pyc
CHANGED
Binary files a/llava/model/multimodal_encoder/__pycache__/siglip_encoder.cpython-310.pyc and b/llava/model/multimodal_encoder/__pycache__/siglip_encoder.cpython-310.pyc differ
|
|
llava/model/multimodal_encoder/dev_eva_clip/__pycache__/eva_vit.cpython-310.pyc
CHANGED
Binary files a/llava/model/multimodal_encoder/dev_eva_clip/__pycache__/eva_vit.cpython-310.pyc and b/llava/model/multimodal_encoder/dev_eva_clip/__pycache__/eva_vit.cpython-310.pyc differ
|
|
llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/__init__.cpython-310.pyc
CHANGED
Binary files a/llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/__init__.cpython-310.pyc and b/llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/__init__.cpython-310.pyc differ
|
|
llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/constants.cpython-310.pyc
CHANGED
Binary files a/llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/constants.cpython-310.pyc and b/llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/constants.cpython-310.pyc differ
|
|
llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/eva_vit_model.cpython-310.pyc
CHANGED
Binary files a/llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/eva_vit_model.cpython-310.pyc and b/llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/eva_vit_model.cpython-310.pyc differ
|
|
llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/factory.cpython-310.pyc
CHANGED
Binary files a/llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/factory.cpython-310.pyc and b/llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/factory.cpython-310.pyc differ
|
|
llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/hf_configs.cpython-310.pyc
CHANGED
Binary files a/llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/hf_configs.cpython-310.pyc and b/llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/hf_configs.cpython-310.pyc differ
|
|
llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/hf_model.cpython-310.pyc
CHANGED
Binary files a/llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/hf_model.cpython-310.pyc and b/llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/hf_model.cpython-310.pyc differ
|
|
llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/loss.cpython-310.pyc
CHANGED
Binary files a/llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/loss.cpython-310.pyc and b/llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/loss.cpython-310.pyc differ
|
|
llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/model.cpython-310.pyc
CHANGED
Binary files a/llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/model.cpython-310.pyc and b/llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/model.cpython-310.pyc differ
|
|
llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/modified_resnet.cpython-310.pyc
CHANGED
Binary files a/llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/modified_resnet.cpython-310.pyc and b/llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/modified_resnet.cpython-310.pyc differ
|
|
llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/openai.cpython-310.pyc
CHANGED
Binary files a/llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/openai.cpython-310.pyc and b/llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/openai.cpython-310.pyc differ
|
|
llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/pretrained.cpython-310.pyc
CHANGED
Binary files a/llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/pretrained.cpython-310.pyc and b/llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/pretrained.cpython-310.pyc differ
|
|
llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/rope.cpython-310.pyc
CHANGED
Binary files a/llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/rope.cpython-310.pyc and b/llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/rope.cpython-310.pyc differ
|
|
llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/timm_model.cpython-310.pyc
CHANGED
Binary files a/llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/timm_model.cpython-310.pyc and b/llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/timm_model.cpython-310.pyc differ
|
|
llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/tokenizer.cpython-310.pyc
CHANGED
Binary files a/llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/tokenizer.cpython-310.pyc and b/llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/tokenizer.cpython-310.pyc differ
|
|
llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/transform.cpython-310.pyc
CHANGED
Binary files a/llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/transform.cpython-310.pyc and b/llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/transform.cpython-310.pyc differ
|
|
llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/transformer.cpython-310.pyc
CHANGED
Binary files a/llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/transformer.cpython-310.pyc and b/llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/transformer.cpython-310.pyc differ
|
|
llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/utils.cpython-310.pyc
CHANGED
Binary files a/llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/utils.cpython-310.pyc and b/llava/model/multimodal_encoder/dev_eva_clip/eva_clip/__pycache__/utils.cpython-310.pyc differ
|
|
llava/model/multimodal_encoder/eva_clip/__pycache__/eva_clip_encoder.cpython-310.pyc
CHANGED
Binary files a/llava/model/multimodal_encoder/eva_clip/__pycache__/eva_clip_encoder.cpython-310.pyc and b/llava/model/multimodal_encoder/eva_clip/__pycache__/eva_clip_encoder.cpython-310.pyc differ
|
|
llava/model/multimodal_encoder/eva_clip/__pycache__/eva_clip_processors.cpython-310.pyc
CHANGED
Binary files a/llava/model/multimodal_encoder/eva_clip/__pycache__/eva_clip_processors.cpython-310.pyc and b/llava/model/multimodal_encoder/eva_clip/__pycache__/eva_clip_processors.cpython-310.pyc differ
|
|
llava/model/multimodal_encoder/eva_clip/__pycache__/eva_vit.cpython-310.pyc
CHANGED
Binary files a/llava/model/multimodal_encoder/eva_clip/__pycache__/eva_vit.cpython-310.pyc and b/llava/model/multimodal_encoder/eva_clip/__pycache__/eva_vit.cpython-310.pyc differ
|
|
llava/model/multimodal_encoder/eva_clip/__pycache__/factory.cpython-310.pyc
CHANGED
Binary files a/llava/model/multimodal_encoder/eva_clip/__pycache__/factory.cpython-310.pyc and b/llava/model/multimodal_encoder/eva_clip/__pycache__/factory.cpython-310.pyc differ
|
|
llava/model/multimodal_projector/__pycache__/builder.cpython-310.pyc
CHANGED
Binary files a/llava/model/multimodal_projector/__pycache__/builder.cpython-310.pyc and b/llava/model/multimodal_projector/__pycache__/builder.cpython-310.pyc differ
|
|
llava/train/__pycache__/llava_trainer.cpython-310.pyc
CHANGED
Binary files a/llava/train/__pycache__/llava_trainer.cpython-310.pyc and b/llava/train/__pycache__/llava_trainer.cpython-310.pyc differ
|
|
llava/train/__pycache__/train.cpython-310.pyc
CHANGED
Binary files a/llava/train/__pycache__/train.cpython-310.pyc and b/llava/train/__pycache__/train.cpython-310.pyc differ
|
|