From c1ffa007ff7c8abf795ffeaac9b8dd596f6a1c90 Mon Sep 17 00:00:00 2001 From: arkohut <39525455+arkohut@users.noreply.github.com> Date: Wed, 6 Nov 2024 16:55:22 +0800 Subject: [PATCH] chore: change default concurrency --- memos/config.py | 5 ++--- memos/default_config.yaml | 4 ++-- memos/server.py | 1 - 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/memos/config.py b/memos/config.py index 368984c..650062e 100644 --- a/memos/config.py +++ b/memos/config.py @@ -11,7 +11,6 @@ from pydantic_settings import ( from pydantic import BaseModel, SecretStr import yaml from collections import OrderedDict -import io import typer @@ -19,7 +18,7 @@ class VLMSettings(BaseModel): modelname: str = "minicpm-v" endpoint: str = "http://localhost:11434" token: str = "" - concurrency: int = 1 + concurrency: int = 8 # some vlm models do not support webp force_jpeg: bool = True # prompt for vlm to extract caption @@ -30,7 +29,7 @@ class OCRSettings(BaseModel): # will by ignored if use_local is True endpoint: str = "http://localhost:5555/predict" token: str = "" - concurrency: int = 1 + concurrency: int = 8 use_local: bool = True force_jpeg: bool = False diff --git a/memos/default_config.yaml b/memos/default_config.yaml index 333dacd..b32cb8a 100644 --- a/memos/default_config.yaml +++ b/memos/default_config.yaml @@ -14,7 +14,7 @@ default_plugins: # using ollama as the vlm server vlm: - concurrency: 1 + concurrency: 8 endpoint: http://localhost:11434 force_jpeg: true modelname: minicpm-v @@ -23,7 +23,7 @@ vlm: # using local ocr ocr: - concurrency: 1 + concurrency: 8 # this is not used if use_local is true endpoint: http://localhost:5555/predict force_jpeg: false diff --git a/memos/server.py b/memos/server.py index 8444fe2..5fbdd29 100644 --- a/memos/server.py +++ b/memos/server.py @@ -17,7 +17,6 @@ import json import cv2 from PIL import Image from secrets import compare_digest -import functools import logging from .config import get_database_path, settings