From 365f9ed15720b24f5a14be5320e7cd7325124c1c Mon Sep 17 00:00:00 2001 From: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com> Date: Wed, 11 Jun 2025 14:28:04 -0700 Subject: [PATCH] Revert "auto register web folder from pyproject (#8478)" (#8497) This reverts commit 9685d4f3c3e34b50d3f2e9bcb52026db7f7e624c. --- comfy_config/types.py | 15 +-------------- nodes.py | 16 ---------------- requirements.txt | 1 - 3 files changed, 1 insertion(+), 31 deletions(-) diff --git a/comfy_config/types.py b/comfy_config/types.py index 11261a13..61198208 100644 --- a/comfy_config/types.py +++ b/comfy_config/types.py @@ -1,4 +1,4 @@ -from pydantic import BaseModel, Field, field_validator +from pydantic import BaseModel, Field from pydantic_settings import BaseSettings, SettingsConfigDict from typing import List, Optional @@ -50,7 +50,6 @@ class ComfyConfig(BaseModel): icon: str = Field(default="", alias="Icon") models: List[Model] = Field(default_factory=list, alias="Models") includes: List[str] = Field(default_factory=list) - web: Optional[str] = None class License(BaseModel): @@ -67,18 +66,6 @@ class ProjectConfig(BaseModel): license: License = Field(default_factory=License) urls: URLs = Field(default_factory=URLs) - @field_validator('license', mode='before') - @classmethod - def validate_license(cls, v): - if isinstance(v, str): - return License(text=v) - elif isinstance(v, dict): - return License(**v) - elif isinstance(v, License): - return v - else: - return License() - class PyProjectConfig(BaseModel): project: ProjectConfig = Field(default_factory=ProjectConfig) diff --git a/nodes.py b/nodes.py index 19612479..637279ff 100644 --- a/nodes.py +++ b/nodes.py @@ -38,8 +38,6 @@ import folder_paths import latent_preview import node_helpers -from comfy_config import config_parser - def before_node_execution(): comfy.model_management.throw_exception_if_processing_interrupted() @@ -2127,20 +2125,6 @@ def load_custom_node(module_path: str, ignore=set(), module_parent="custom_nodes LOADED_MODULE_DIRS[module_name] = os.path.abspath(module_dir) - project_config = config_parser.extract_node_configuration(module_path) - - web_dir_name = project_config.tool_comfy.web - - if web_dir_name: - web_dir_path = os.path.join(module_path, web_dir_name) - - if os.path.isdir(web_dir_path): - project_name = project_config.project.name - - EXTENSION_WEB_DIRS[project_name] = web_dir_path - - logging.info("Automatically register web folder {} for {}".format(web_dir_name, project_name)) - if hasattr(module, "WEB_DIRECTORY") and getattr(module, "WEB_DIRECTORY") is not None: web_dir = os.path.abspath(os.path.join(module_dir, getattr(module, "WEB_DIRECTORY"))) if os.path.isdir(web_dir): diff --git a/requirements.txt b/requirements.txt index 6c5bf1d9..4a0a7d7f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -27,4 +27,3 @@ spandrel soundfile av>=14.2.0 pydantic~=2.0 -pydantic-settings~=2.0