From 007a171923f258ae44e0d548b6107d34bff387f0 Mon Sep 17 00:00:00 2001 From: XchanBik Date: Sat, 10 May 2025 22:25:19 +0200 Subject: [PATCH] Update __init__.py --- __init__.py | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/__init__.py b/__init__.py index 4503255..22e0caa 100644 --- a/__init__.py +++ b/__init__.py @@ -9,26 +9,6 @@ from .Bridge import SimpleBridgeStoreNode, SimpleBridgeLoadNode def __init__(self): pass -# --- Logique d'installation --- -# Ce code s'exécute lorsque ComfyUI charge ce fichier depuis custom_nodes. -if PROMPT_SERVER_INSTANCE: - # Crée une instance de notre intercepteur - minimal_interceptor_instance = MinimalWorkflowInterceptor() - # Installe le hook - minimal_interceptor_instance.install() -else: - # Ce message est important pour que l'utilisateur le voie si la configuration échoue. - print("\n" + "="*70) - print("MINIMAL HOOK EXTENSION: Instance de PromptServer NON TROUVÉE au chargement du module.") - print("Le hook pour 'queue_prompt' N'A PAS ÉTÉ INSTALLÉ.") - print("Cela signifie généralement que l'environnement du serveur ComfyUI n'est pas celui attendu,") - print("ou que ce script est chargé avant que 'PromptServer.instance' ne soit prêt.") - print("Si ComfyUI démarre normalement, vérifiez la console pour les messages 'MINIMAL HOOK' précédents.") - print("="*70 + "\n") - -# Message final pour confirmer le chargement du module -print("MINIMAL HOOK EXTENSION: Module chargé.") - # Node mapping NODE_CLASS_MAPPINGS = { "SimpleBridgeStoreNode": SimpleBridgeStoreNode, @@ -43,4 +23,9 @@ NODE_DISPLAY_NAME_MAPPINGS = { "LoraTextLoader": "LoraTextFile as String" } +# Crée une instance de notre intercepteur +minimal_interceptor_instance = MinimalWorkflowInterceptor() +# Installe le hook +minimal_interceptor_instance.install() + __all__ = ["NODE_CLASS_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS"]