Skip to content

Commit 365f9ed

Browse files
Revert "auto register web folder from pyproject (comfyanonymous#8478)" (comfyanonymous#8497)
This reverts commit 9685d4f.
1 parent 50c605e commit 365f9ed

File tree

3 files changed

+1
-31
lines changed

3 files changed

+1
-31
lines changed

comfy_config/types.py

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from pydantic import BaseModel, Field, field_validator
1+
from pydantic import BaseModel, Field
22
from pydantic_settings import BaseSettings, SettingsConfigDict
33
from typing import List, Optional
44

@@ -50,7 +50,6 @@ class ComfyConfig(BaseModel):
5050
icon: str = Field(default="", alias="Icon")
5151
models: List[Model] = Field(default_factory=list, alias="Models")
5252
includes: List[str] = Field(default_factory=list)
53-
web: Optional[str] = None
5453

5554

5655
class License(BaseModel):
@@ -67,18 +66,6 @@ class ProjectConfig(BaseModel):
6766
license: License = Field(default_factory=License)
6867
urls: URLs = Field(default_factory=URLs)
6968

70-
@field_validator('license', mode='before')
71-
@classmethod
72-
def validate_license(cls, v):
73-
if isinstance(v, str):
74-
return License(text=v)
75-
elif isinstance(v, dict):
76-
return License(**v)
77-
elif isinstance(v, License):
78-
return v
79-
else:
80-
return License()
81-
8269

8370
class PyProjectConfig(BaseModel):
8471
project: ProjectConfig = Field(default_factory=ProjectConfig)

nodes.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@
3838
import latent_preview
3939
import node_helpers
4040

41-
from comfy_config import config_parser
42-
4341
def before_node_execution():
4442
comfy.model_management.throw_exception_if_processing_interrupted()
4543

@@ -2127,20 +2125,6 @@ def load_custom_node(module_path: str, ignore=set(), module_parent="custom_nodes
21272125

21282126
LOADED_MODULE_DIRS[module_name] = os.path.abspath(module_dir)
21292127

2130-
project_config = config_parser.extract_node_configuration(module_path)
2131-
2132-
web_dir_name = project_config.tool_comfy.web
2133-
2134-
if web_dir_name:
2135-
web_dir_path = os.path.join(module_path, web_dir_name)
2136-
2137-
if os.path.isdir(web_dir_path):
2138-
project_name = project_config.project.name
2139-
2140-
EXTENSION_WEB_DIRS[project_name] = web_dir_path
2141-
2142-
logging.info("Automatically register web folder {} for {}".format(web_dir_name, project_name))
2143-
21442128
if hasattr(module, "WEB_DIRECTORY") and getattr(module, "WEB_DIRECTORY") is not None:
21452129
web_dir = os.path.abspath(os.path.join(module_dir, getattr(module, "WEB_DIRECTORY")))
21462130
if os.path.isdir(web_dir):

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,3 @@ spandrel
2727
soundfile
2828
av>=14.2.0
2929
pydantic~=2.0
30-
pydantic-settings~=2.0

0 commit comments

Comments
 (0)