Check model existence before unloading
Add a check to ensure model exists before unloading.
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
subgen_version = '2026.01.3'
|
subgen_version = '2026.01.4'
|
||||||
|
|
||||||
"""
|
"""
|
||||||
ENVIRONMENT VARIABLES DOCUMENTATION
|
ENVIRONMENT VARIABLES DOCUMENTATION
|
||||||
@@ -797,6 +797,7 @@ def delete_model():
|
|||||||
global model
|
global model
|
||||||
if clear_vram_on_complete and task_queue.is_idle():
|
if clear_vram_on_complete and task_queue.is_idle():
|
||||||
logging.debug("Queue idle; clearing model from memory.")
|
logging.debug("Queue idle; clearing model from memory.")
|
||||||
|
if model:
|
||||||
model.model.unload_model()
|
model.model.unload_model()
|
||||||
del model
|
del model
|
||||||
model = None
|
model = None
|
||||||
|
|||||||
Reference in New Issue
Block a user