mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-02-10 13:32:36 +08:00
revert import reordering
This commit is contained in:
parent
3904e8a21b
commit
a0b6979f07
@ -1,16 +1,16 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import os
|
||||||
|
import folder_paths
|
||||||
import glob
|
import glob
|
||||||
|
from aiohttp import web
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
import os
|
|
||||||
from functools import lru_cache
|
from functools import lru_cache
|
||||||
|
|
||||||
from aiohttp import web
|
|
||||||
|
|
||||||
import folder_paths
|
|
||||||
from utils.json_util import merge_json_recursive
|
from utils.json_util import merge_json_recursive
|
||||||
|
|
||||||
|
|
||||||
# Extra locale files to load into main.json
|
# Extra locale files to load into main.json
|
||||||
EXTRA_LOCALE_FILES = [
|
EXTRA_LOCALE_FILES = [
|
||||||
"nodeDefs.json",
|
"nodeDefs.json",
|
||||||
@ -32,15 +32,6 @@ def safe_load_json_file(file_path: str) -> dict:
|
|||||||
|
|
||||||
|
|
||||||
class CustomNodeManager:
|
class CustomNodeManager:
|
||||||
"""Manages and resolves folders for custom nodes.
|
|
||||||
|
|
||||||
The custom_nodes folder location can be overridden
|
|
||||||
by passing in a folder argument --custom-nodes-directory.
|
|
||||||
|
|
||||||
The argument can take appropriately delimited path entries, e.g.
|
|
||||||
`... --custom-nodes-directory /path/to/custom1:/path/to/custom2` for linux / osx (:)
|
|
||||||
`... --custom-nodes-directory "X:\\path\\to\\custom1;X:\\path\\to\\custom2"` for windows (;)
|
|
||||||
"""
|
|
||||||
@lru_cache(maxsize=1)
|
@lru_cache(maxsize=1)
|
||||||
def build_translations(self):
|
def build_translations(self):
|
||||||
"""Load all custom nodes translations during initialization. Translations are
|
"""Load all custom nodes translations during initialization. Translations are
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
import argparse
|
import argparse
|
||||||
import enum
|
import enum
|
||||||
import os
|
import os
|
||||||
|
|
||||||
import comfy.options
|
import comfy.options
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,12 +1,12 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import logging
|
|
||||||
import mimetypes
|
|
||||||
import os
|
import os
|
||||||
import sys
|
|
||||||
import time
|
import time
|
||||||
|
import mimetypes
|
||||||
|
import logging
|
||||||
|
import sys
|
||||||
|
from typing import Literal, List
|
||||||
from collections.abc import Collection
|
from collections.abc import Collection
|
||||||
from typing import List, Literal
|
|
||||||
|
|
||||||
from comfy.cli_args import args
|
from comfy.cli_args import args
|
||||||
|
|
||||||
@ -117,8 +117,6 @@ def set_input_directory(input_dir: str) -> None:
|
|||||||
input_directory = input_dir
|
input_directory = input_dir
|
||||||
|
|
||||||
def set_custom_nodes_directory(custom_nodes_dir: str) -> None:
|
def set_custom_nodes_directory(custom_nodes_dir: str) -> None:
|
||||||
#NOTE: this function doesn't need a "get_custom_nodes_directory", we have "get_folder_paths".
|
|
||||||
# PATH style ';' / ':' (platform dependant) delimiters allow for more folders.
|
|
||||||
global folder_names_and_paths
|
global folder_names_and_paths
|
||||||
|
|
||||||
delimiter = ":"
|
delimiter = ":"
|
||||||
|
|||||||
18
main.py
18
main.py
@ -1,21 +1,19 @@
|
|||||||
import comfy.options
|
import comfy.options
|
||||||
|
|
||||||
comfy.options.enable_args_parsing()
|
comfy.options.enable_args_parsing()
|
||||||
|
|
||||||
import importlib.util
|
|
||||||
import itertools
|
|
||||||
import logging
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import importlib.util
|
||||||
import time
|
|
||||||
|
|
||||||
import folder_paths
|
import folder_paths
|
||||||
import utils.extra_config
|
import time
|
||||||
from app.logger import setup_logger
|
|
||||||
from comfy.cli_args import args
|
from comfy.cli_args import args
|
||||||
from comfy_api import feature_flags
|
from app.logger import setup_logger
|
||||||
|
import itertools
|
||||||
|
import utils.extra_config
|
||||||
|
import logging
|
||||||
|
import sys
|
||||||
from comfy_execution.progress import get_progress_state
|
from comfy_execution.progress import get_progress_state
|
||||||
from comfy_execution.utils import get_executing_context
|
from comfy_execution.utils import get_executing_context
|
||||||
|
from comfy_api import feature_flags
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
#NOTE: These do not do anything on core ComfyUI, they are for custom nodes.
|
#NOTE: These do not do anything on core ComfyUI, they are for custom nodes.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user