revert imports pt 2

This commit is contained in:
Sasbom 2025-11-17 06:09:21 +01:00
parent a0b6979f07
commit 1ec230e65c

13
main.py
View File

@ -111,9 +111,9 @@ execute_prestartup_script()
# Main code # Main code
import asyncio import asyncio
import gc
import shutil import shutil
import threading import threading
import gc
if os.name == "nt": if os.name == "nt":
os.environ['MIMALLOC_PURGE_DELAY'] = '0' os.environ['MIMALLOC_PURGE_DELAY'] = '0'
@ -148,15 +148,16 @@ if __name__ == "__main__":
if 'torch' in sys.modules: if 'torch' in sys.modules:
logging.warning("WARNING: Potential Error in code: Torch already imported, torch should never be imported before this point.") logging.warning("WARNING: Potential Error in code: Torch already imported, torch should never be imported before this point.")
import app.logger
import comfy.model_management
import comfy.utils import comfy.utils
import comfyui_version
import execution import execution
import hook_breaker_ac10a0
import nodes
import server import server
from protocol import BinaryEventTypes from protocol import BinaryEventTypes
import nodes
import comfy.model_management
import comfyui_version
import app.logger
import hook_breaker_ac10a0
def cuda_malloc_warning(): def cuda_malloc_warning():