优化ComfyKit实例管理逻辑, 提升调用runninghub时的稳定性

This commit is contained in:
puke
2025-11-19 17:14:27 +08:00
parent 374246237d
commit 8aad91006d
8 changed files with 176 additions and 38 deletions

View File

@@ -45,10 +45,11 @@ async def get_pixelle_video() -> PixelleVideoCore:
async def shutdown_pixelle_video():
"""Shutdown Pixelle-Video instance"""
"""Shutdown Pixelle-Video instance and cleanup resources"""
global _pixelle_video_instance
if _pixelle_video_instance:
logger.info("Shutting down Pixelle-Video...")
await _pixelle_video_instance.cleanup()
_pixelle_video_instance = None