Skip to content

Commit

Permalink
check whether backend_config is None or not before accessing its attr
Browse files Browse the repository at this point in the history
  • Loading branch information
lvhan028 committed Dec 3, 2024
1 parent 8fbfed6 commit e6e4c22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lmdeploy/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def pipeline(model_path: str,

task, pipeline_class = get_task(model_path)
if task == 'vlm':
if backend_config.enable_prefix_caching:
if backend_config and backend_config.enable_prefix_caching:
backend_config.enable_prefix_caching = False
logger.warning('VLM does not support prefix caching.')

Expand Down

0 comments on commit e6e4c22

Please sign in to comment.