Skip to content

Commit

Permalink
Use comfyui_frontend_package pypi package to manage frontend dependen…
Browse files Browse the repository at this point in the history
…cy (Frontend v1.10.17) (#7021)

* Use frontend pypi package

* Remove web/

* nit

* nit

* Update importlib logic

* Remove unused gh action

* Update code owners

* Update codeowners

* error message
  • Loading branch information
huchenlei authored Mar 2, 2025
1 parent 9af6320 commit 04cf0cc
Show file tree
Hide file tree
Showing 96 changed files with 14 additions and 335,152 deletions.
58 changes: 0 additions & 58 deletions .github/workflows/update-frontend.yml

This file was deleted.

5 changes: 2 additions & 3 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,13 @@
/notebooks/ @yoland68 @robinjhuang @huchenlei @webfiltered @pythongosssss @ltdrdata @Kosinkadink
/script_examples/ @yoland68 @robinjhuang @huchenlei @webfiltered @pythongosssss @ltdrdata @Kosinkadink
/.github/ @yoland68 @robinjhuang @huchenlei @webfiltered @pythongosssss @ltdrdata @Kosinkadink
/requirements.txt @yoland68 @robinjhuang @huchenlei @webfiltered @pythongosssss @ltdrdata @Kosinkadink
/pyproject.toml @yoland68 @robinjhuang @huchenlei @webfiltered @pythongosssss @ltdrdata @Kosinkadink

# Python web server
/api_server/ @yoland68 @robinjhuang @huchenlei @webfiltered @pythongosssss @ltdrdata
/app/ @yoland68 @robinjhuang @huchenlei @webfiltered @pythongosssss @ltdrdata
/utils/ @yoland68 @robinjhuang @huchenlei @webfiltered @pythongosssss @ltdrdata

# Frontend assets
/web/ @huchenlei @webfiltered @pythongosssss @yoland68 @robinjhuang

# Extra nodes
/comfy_extras/ @yoland68 @robinjhuang @huchenlei @pythongosssss @ltdrdata @Kosinkadink
12 changes: 11 additions & 1 deletion app/frontend_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,26 @@
import re
import tempfile
import zipfile
import importlib
from dataclasses import dataclass
from functools import cached_property
from pathlib import Path
from typing import TypedDict, Optional

import requests
from typing_extensions import NotRequired

from comfy.cli_args import DEFAULT_VERSION_STRING


try:
import comfyui_frontend_package
except ImportError as e:
# TODO: Remove the check after roll out of 0.3.16
logging.error("comfyui-frontend-package is not installed. Please install the updated requirements.txt file by running: pip install -r requirements.txt")
raise e


REQUEST_TIMEOUT = 10 # seconds


Expand Down Expand Up @@ -109,7 +119,7 @@ def download_release_asset_zip(release: Release, destination_path: str) -> None:


class FrontendManager:
DEFAULT_FRONTEND_PATH = str(Path(__file__).parents[1] / "web")
DEFAULT_FRONTEND_PATH = str(importlib.resources.files(comfyui_frontend_package) / "static")
CUSTOM_FRONTENDS_ROOT = str(Path(__file__).parents[1] / "web_custom_versions")

@classmethod
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
comfyui-frontend-package==1.10.17
torch
torchsde
torchvision
Expand Down
51 changes: 0 additions & 51 deletions web/assets/BaseViewTemplate-BTbuZf5t.js

This file was deleted.

1 change: 0 additions & 1 deletion web/assets/CREDIT.txt

This file was deleted.

19 changes: 0 additions & 19 deletions web/assets/DesktopStartView-D9r53Bue.js

This file was deleted.

58 changes: 0 additions & 58 deletions web/assets/DesktopUpdateView-C-R0415K.js

This file was deleted.

20 changes: 0 additions & 20 deletions web/assets/DesktopUpdateView-CxchaIvw.css

This file was deleted.

58 changes: 0 additions & 58 deletions web/assets/DownloadGitView-PWqK5ke4.js

This file was deleted.

Loading

0 comments on commit 04cf0cc

Please sign in to comment.