diff --git a/lmdeploy/serve/gradio/app.py b/lmdeploy/serve/gradio/app.py index a3cd00351e..7812358eff 100644 --- a/lmdeploy/serve/gradio/app.py +++ b/lmdeploy/serve/gradio/app.py @@ -48,7 +48,6 @@ def run(model_path_or_server: str, pipeline_type, _ = get_task(model_path_or_server) if pipeline_type == 'vlm': from lmdeploy.serve.gradio.vl import run_local - assert backend == 'turbomind', 'vlm only support turbomind backend' if backend_config is not None and \ backend_config.session_len is None: backend_config.session_len = 8192 diff --git a/lmdeploy/serve/gradio/vl.py b/lmdeploy/serve/gradio/vl.py index 64bf8c6160..ebeb371492 100644 --- a/lmdeploy/serve/gradio/vl.py +++ b/lmdeploy/serve/gradio/vl.py @@ -174,7 +174,10 @@ def cancel(chatbot, session): def reset(session): """Reset a new session.""" - stop(session) + if session is None: + session = Session() + else: + stop(session) session._step = 0 session._message = [] return [], session, enable_btn