[mypy] Misc. typing improvements (#7417)
This commit is contained in:
@@ -165,7 +165,7 @@ def get_internvl_num_patches(image_size: int, patch_size: int,
|
||||
|
||||
|
||||
def get_max_internvl_image_tokens(ctx: InputContext):
|
||||
hf_config = ctx.get_hf_config(PretrainedConfig)
|
||||
hf_config = ctx.get_hf_config()
|
||||
vision_config = hf_config.vision_config
|
||||
|
||||
use_thumbnail = hf_config.use_thumbnail
|
||||
@@ -187,7 +187,7 @@ def input_processor_for_internvl(ctx: InputContext, llm_inputs: LLMInputs):
|
||||
return llm_inputs
|
||||
|
||||
model_config = ctx.model_config
|
||||
hf_config = ctx.get_hf_config(PretrainedConfig)
|
||||
hf_config = ctx.get_hf_config()
|
||||
vision_config = hf_config.vision_config
|
||||
|
||||
image_size = vision_config.image_size
|
||||
@@ -260,7 +260,7 @@ def dummy_data_for_internvl(ctx: InputContext, seq_len: int):
|
||||
|
||||
image_feature_size = get_max_internvl_image_tokens(ctx)
|
||||
model_config = ctx.model_config
|
||||
hf_config = ctx.get_hf_config(PretrainedConfig)
|
||||
hf_config = ctx.get_hf_config()
|
||||
vision_config = hf_config.vision_config
|
||||
tokenizer = cached_get_tokenizer(model_config.tokenizer,
|
||||
trust_remote_code=True)
|
||||
|
||||
Reference in New Issue
Block a user