The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.
comfy should only contain model related stuff. (#17307)
comfyanonymous72a13ee69ecd
diff --git a/comfy/comfy_api_env.py b/app/comfy_api_env.pysimilarity index 100%rename from comfy/comfy_api_env.pyrename to app/comfy_api_env.pydiff --git a/comfy/deploy_environment.py b/app/deploy_environment.pysimilarity index 93%rename from comfy/deploy_environment.pyrename to app/deploy_environment.pyindex 8c99a3584..460471768 100644--- a/comfy/deploy_environment.py+++ b/app/deploy_environment.py@@ -7,7 +7,7 @@ logger = logging.getLogger(__name__)_DEFAULT_DEPLOY_ENV = "local-git"_ENV_FILENAME = ".comfy_environment"-# Resolve the ComfyUI install directory (the parent of this `comfy/` package).+# Resolve the ComfyUI install directory (the parent of this `app/` package).# We deliberately avoid `folder_paths.base_path` here because that is overridden# by the `--base-directory` CLI arg to a user-supplied path, whereas the# `.comfy_environment` marker is written by launchers/installers next to thediff --git a/comfy_api_nodes/util/_helpers.py b/comfy_api_nodes/util/_helpers.pyindex bb309b0da..9a051e1d9 100644--- a/comfy_api_nodes/util/_helpers.py+++ b/comfy_api_nodes/util/_helpers.py@@ -17,9 +17,9 @@ import aiohttpfrom aiohttp.client_exceptions import ClientErrorfrom yarl import URL+from app.comfy_api_env import normalize_comfy_api_base+from app.deploy_environment import get_deploy_environmentfrom comfy.cli_args import args-from comfy.comfy_api_env import normalize_comfy_api_base-from comfy.deploy_environment import get_deploy_environmentfrom comfy.model_management import processing_interruptedfrom comfy_api.latest import IOfrom comfy_execution.graph_utils import is_linkdiff --git a/server.py b/server.pyindex 6af7adf31..718b67872 100644--- a/server.py+++ b/server.py@@ -36,11 +36,11 @@ import loggingimport mimetypesfrom comfy.cli_args import args-from comfy.deploy_environment import get_deploy_environmentimport comfy.utilsimport comfy.model_managementfrom comfy_api import feature_flags-from comfy.comfy_api_env import get_environment_overrides+from app.comfy_api_env import get_environment_overrides+from app.deploy_environment import get_deploy_environmentimport node_helpersfrom comfyui_version import __version__from app.frontend_management import FrontendManager, parse_versiondiff --git a/tests-unit/deploy_environment_test.py b/tests-unit/deploy_environment_test.pyindex c3497fbb0..bfdfbd75e 100644--- a/tests-unit/deploy_environment_test.py+++ b/tests-unit/deploy_environment_test.py@@ -1,11 +1,11 @@-"""Tests for comfy.deploy_environment."""+"""Tests for app.deploy_environment."""import osimport pytest-from comfy import deploy_environment-from comfy.deploy_environment import get_deploy_environment+from app import deploy_environment+from app.deploy_environment import get_deploy_environment@pytest.fixture(autouse=True)diff --git a/tests-unit/feature_flags_test.py b/tests-unit/feature_flags_test.pyindex cb2b58b88..d68b044e0 100644--- a/tests-unit/feature_flags_test.py+++ b/tests-unit/feature_flags_test.py@@ -11,7 +11,7 @@ from comfy_api.feature_flags import (_coerce_flag_value,_parse_cli_feature_flags,)-from comfy.comfy_api_env import (+from app.comfy_api_env import (environment_overrides_for_base,get_environment_overrides,normalize_comfy_api_base,@@ -237,7 +237,7 @@ class TestComfyApiEnv:def test_environment_overrides_only_for_staging_tier(self, monkeypatch):def set_base(url):monkeypatch.setattr(- "comfy.comfy_api_env.args",+ "app.comfy_api_env.args",type("Args", (), {"comfy_api_base": url})(),)@@ -253,7 +253,7 @@ class TestComfyApiEnv:def test_server_features_never_carry_env_overrides(self, monkeypatch):"""The WebSocket capability handshake must stay free of routing keys."""monkeypatch.setattr(- "comfy.comfy_api_env.args",+ "app.comfy_api_env.args",type("Args", (), {"comfy_api_base": "https://pr-7.testenvs.comfy.org"})(),)features = get_server_features()