Exl3: Clear image embedding cache on unload
This commit is contained in:
parent
e362319a4d
commit
0ae878712e
1 changed files with 4 additions and 0 deletions
|
|
@ -24,6 +24,7 @@ from loguru import logger
|
|||
|
||||
from backends.base_model_container import BaseModelContainer
|
||||
from backends.exllamav3.sampler import ExllamaV3SamplerBuilder
|
||||
from backends.exllamav3.vision import clear_image_embedding_cache
|
||||
from common.concurrency import iterate_in_threadpool
|
||||
from common.gen_logging import (
|
||||
log_generation_params,
|
||||
|
|
@ -509,6 +510,9 @@ class ExllamaV3Container(BaseModelContainer):
|
|||
# Wait for other jobs to finish
|
||||
await self.wait_for_jobs(kwargs.get("skip_wait"))
|
||||
|
||||
# Clear the image embedding cache
|
||||
clear_image_embedding_cache()
|
||||
|
||||
self.model.unload()
|
||||
self.model = None
|
||||
self.config = None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue