mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 09:14:35 +02:00
fix(vqa): improve unload logging consistency
Add before/after debug messages when unloading VQA model to match the pattern used in prompt enhance for better debugging visibility.
This commit is contained in:
@@ -365,12 +365,14 @@ class VQA:
|
||||
def unload(self):
|
||||
"""Release VLM model from GPU/memory."""
|
||||
if self.model is not None:
|
||||
shared.log.debug(f'VQA unload: model="{self.loaded}"')
|
||||
model_name = self.loaded
|
||||
shared.log.debug(f'VQA unload: unloading model="{model_name}"')
|
||||
sd_models.move_model(self.model, devices.cpu, force=True)
|
||||
self.model = None
|
||||
self.processor = None
|
||||
self.loaded = None
|
||||
devices.torch_gc(force=True, reason='vqa unload')
|
||||
shared.log.debug(f'VQA unload: model="{model_name}" unloaded')
|
||||
else:
|
||||
shared.log.debug('VQA unload: no model loaded')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user