Compare commits

...

2 Commits

Author SHA1 Message Date
341a7b1473 Fix: judge not empty before delete (#10099)
### What problem does this PR solve?

judge not empty before delete session.

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-09-15 17:49:52 +08:00
c29c395390 Fix: The same model appears twice in the drop-down box. #10102 (#10103)
### What problem does this PR solve?

Fix: The same model appears twice in the drop-down box. #10102

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-09-15 16:38:08 +08:00
3 changed files with 12 additions and 4 deletions

View File

@ -351,7 +351,8 @@ class TextRecognizer:
def close(self):
# close session and release manually
logging.info('Close TextRecognizer.')
del self.predictor
if hasattr(self, "predictor"):
del self.predictor
gc.collect()
def __call__(self, img_list):
@ -490,7 +491,8 @@ class TextDetector:
def close(self):
logging.info("Close TextDetector.")
del self.predictor
if hasattr(self, "predictor"):
del self.predictor
gc.collect()
def __call__(self, img):

View File

@ -408,7 +408,8 @@ class Recognizer:
def close(self):
logging.info("Close recognizer.")
del self.ort_sess
if hasattr(self, "ort_sess"):
del self.ort_sess
gc.collect()
def __call__(self, image_list, thr=0.7, batch_size=16):

View File

@ -155,7 +155,12 @@ export const useComposeLlmOptionsByModelTypes = (
options.forEach((x) => {
const item = pre.find((y) => y.label === x.label);
if (item) {
item.options.push(...x.options);
x.options.forEach((y) => {
// A model that is both an image2text and speech2text model
if (!item.options.some((z) => z.value === y.value)) {
item.options.push(y);
}
});
} else {
pre.push(x);
}