Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Jintao-Huang committed Feb 18, 2025
1 parent f4ef4ab commit 901e4da
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion swift/llm/model/model/deepseek.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def get_model_tokenizer_deepseek_janus(model_dir: str, *args, **kwargs):
if not local_repo_path:
local_repo_path = git_clone_github('https://github.com/deepseek-ai/Janus')
sys.path.append(os.path.join(local_repo_path))
from janus.models import MultiModalityCausalLM, VLChatProcessor
from janus.models import VLChatProcessor

processor: VLChatProcessor = VLChatProcessor.from_pretrained(model_dir)
return _get_deepseek_vl(processor, 'language_model', model_dir, *args, **kwargs)
Expand Down
6 changes: 3 additions & 3 deletions swift/llm/model/register.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,10 +371,10 @@ def _get_arch_mapping():
def get_matched_model_types(architectures: Optional[List[str]]) -> List[str]:
"""Get possible model_type."""
architectures = architectures or ['nulll']
if arch:
arch = arch[0]
if architectures:
arch = architectures[0]
arch_mapping = _get_arch_mapping()
return arch_mapping.get(arch) or []
return arch_mapping.get(architectures) or []


def _get_model_info(model_dir: str, model_type: Optional[str], quantization_config) -> ModelInfo:
Expand Down

0 comments on commit 901e4da

Please sign in to comment.