Refactor:naive_merge_with_images close useless images (#9296)

### What problem does this PR solve?

naive_merge_with_images close useless images

### Type of change

- [x] Refactoring
This commit is contained in:
Stephen Hu
2025-08-07 11:07:29 +08:00
committed by GitHub
parent f0c34d4454
commit 0a0bfc02a0

View File

@ -612,6 +612,10 @@ def naive_merge_with_images(texts, images, chunk_token_num=128, delimiter="\n。
continue continue
add_chunk(sub_sec, image) add_chunk(sub_sec, image)
for img in images:
if isinstance(img, Image.Image):
img.close()
return cks, result_images return cks, result_images
def docx_question_level(p, bull=-1): def docx_question_level(p, bull=-1):