diff --git a/ComfyUI b/ComfyUI deleted file mode 160000 index 0d4e29f1..00000000 --- a/ComfyUI +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 0d4e29f13fafb8fc003a213bb38d4ef4e4e6aa8a diff --git a/WebUI/src/App.vue b/WebUI/src/App.vue index b6a92921..a53a5e33 100644 --- a/WebUI/src/App.vue +++ b/WebUI/src/App.vue @@ -68,7 +68,7 @@ - + diff --git a/WebUI/src/assets/i18n/en-US.json b/WebUI/src/assets/i18n/en-US.json index f004e13c..329f556f 100644 --- a/WebUI/src/assets/i18n/en-US.json +++ b/WebUI/src/assets/i18n/en-US.json @@ -40,6 +40,9 @@ "COM_DO_NOT_SHOW_AGAIN": "Do not show again", "SETTINGS_MODEL_IMAGE_RESOLUTION_HD_CONFIRM": "HD Mode can result in slower than normal performance on systems with less than 12 GB of VRAM or 24GB of system memory for Intel Core Ultra PCs", "SETTINGS_MODEL_WORKFLOW_COMFYUI_CONFIRM": "The use of the workflow mode requires ComfyUI to be installed. This is an additional module that will be installed upon confirmation. Please make sure you have a stable internet connection.", + "SETTINGS_MODEL_WORKFLOW_COMFYUI_DOWNLOADING": "Installation in progress...", + "SETTINGS_MODEL_WORKFLOW_COMFYUI_COMPLETED": "Installation successful!", + "SETTINGS_MODEL_WORKFLOW_COMFYUI_ERROR": "Installation failed, due to ", "SETTINGS_TAB_IMAGE": "Image", "SETTINGS_TAB_BASIC": "Basic", "SETTINGS_TAB_MODEL": "Models", diff --git a/WebUI/src/assets/js/store/imageGeneration.ts b/WebUI/src/assets/js/store/imageGeneration.ts index 0758e3af..c6d6dcb7 100644 --- a/WebUI/src/assets/js/store/imageGeneration.ts +++ b/WebUI/src/assets/js/store/imageGeneration.ts @@ -511,7 +511,7 @@ export const useImageGeneration = defineStore("imageGeneration", () => { } return {type: modelTypeToId(modelType), repo_id: repoAddress, backend: "comfyui"} } - const checkList: CheckModelAlreadyLoadedParameters[] = activeWorkflow.value!.comfyUIRequirements!.requiredModels.map( extractDownloadModelParamsFromString) + const checkList: CheckModelAlreadyLoadedParameters[] = activeWorkflow.value!.comfyUIRequirements!.requiredModels.map( extractDownloadModelParamsFromString ) const checkedModels: CheckModelAlreadyLoadedResult[] = await globalSetup.checkModelAlreadyLoaded(checkList); const modelsToBeLoaded = checkedModels.filter(checkModelExistsResult => !checkModelExistsResult.already_loaded) for (const item of modelsToBeLoaded) { diff --git a/WebUI/src/components/SettingsImageWorkflowSelector.vue b/WebUI/src/components/SettingsImageWorkflowSelector.vue index fdf2f332..3698b0a3 100644 --- a/WebUI/src/components/SettingsImageWorkflowSelector.vue +++ b/WebUI/src/components/SettingsImageWorkflowSelector.vue @@ -19,23 +19,7 @@ - -
-

- {{ languages.SETTINGS_MODEL_WORKFLOW_COMFYUI_CONFIRM }} -

-
- -
- -
-
-
-
+

{{ "Mode" }}

@@ -45,7 +29,7 @@ @click="() => { imageGeneration.backend = 'default' }"> + @click="() => { onSwitchToComfyUI() }">
@@ -109,10 +93,11 @@
+ + \ No newline at end of file diff --git a/WebUI/src/env.d.ts b/WebUI/src/env.d.ts index 70ffc6ba..4f27902a 100644 --- a/WebUI/src/env.d.ts +++ b/WebUI/src/env.d.ts @@ -305,6 +305,11 @@ type DownloadModelRender = { size: string, gated?: boolean, accessGranted?: bool type DownloadModelParam = CheckModelAlreadyLoadedParameters +type ComfyUICustomNodesRequestParameters = { + username: string, + repoName: string +} + type CheckModelAlreadyLoadedResult = { already_loaded: boolean diff --git a/service/comfyui_downloader.py b/service/comfyui_downloader.py index 4b5e9fcc..c4de2ed1 100644 --- a/service/comfyui_downloader.py +++ b/service/comfyui_downloader.py @@ -111,7 +111,7 @@ def install_comfyUI() -> bool: def is_custom_node_installed(node_repo_ref: ComfyUICustomNodesGithubRepoId) -> bool: - expected_custom_node_path = os.path.join(service_config.comfyUIRootPath, "custom_nodes", node_repo_ref.reponame) + expected_custom_node_path = os.path.join(service_config.comfyUIRootPath, "custom_nodes", node_repo_ref.repoName) return os.path.exists(expected_custom_node_path) def download_custom_node(node_repo_data: ComfyUICustomNodesGithubRepoId): @@ -119,15 +119,15 @@ def download_custom_node(node_repo_data: ComfyUICustomNodesGithubRepoId): return else: try: - expected_git_url = f"https://github.com/{node_repo_data.username}/{node_repo_data.reponame}" - expected_custom_node_path = os.path.join(service_config.comfyUIRootPath, "custom_nodes", node_repo_data.reponame) + expected_git_url = f"https://github.com/{node_repo_data.username}/{node_repo_data.repoName}" + expected_custom_node_path = os.path.join(service_config.comfyUIRootPath, "custom_nodes", node_repo_data.repoName) potential_node_requirements = os.path.join(expected_custom_node_path, "requirements.txt") _install_git_repo(expected_git_url, expected_custom_node_path) _install_pip_requirements(potential_node_requirements) - logging.error(f"Failed to install custom comfy node {node_repo_data.username}/{node_repo_data.reponame} due to {e}") + logging.error(f"Failed to install custom comfy node {node_repo_data.username}/{node_repo_data.repoName} due to {e}") return except Exception as e: - logging.error(f"Failed to install custom comfy node {node_repo_data.username}/{node_repo_data.reponame} due to {e}") + logging.error(f"Failed to install custom comfy node {node_repo_data.username}/{node_repo_data.repoName} due to {e}") raise e diff --git a/service/web_api.py b/service/web_api.py index 49fa5d69..6d1e7e61 100644 --- a/service/web_api.py +++ b/service/web_api.py @@ -45,6 +45,7 @@ import traceback import logging +import time logging.basicConfig(stream=sys.stdout, level=logging.INFO) @@ -387,6 +388,8 @@ def is_comfyUI_loaded(): @app.post("/api/comfy-ui/install") def install_comfyUI(): + # time.sleep(5) + # return jsonify({"success": True, "error_message": "Test Error"}) try: installation_success = comfyui_downloader.install_comfyUI() return jsonify({"success": installation_success, "error_message": ""}) @@ -397,7 +400,7 @@ def install_comfyUI(): @app.post("/api/comfy-ui/are_custom_nodes_loaded") @app.input(ComfyUICustomNodesDownloadRequest.Schema, location='json', arg_name='comfyNodeRequest') def are_custom_nodes_installed(comfyNodeRequest: ComfyUICustomNodesDownloadRequest): - response = { f"{x.username}/{x.reponame}" : comfyui_downloader.is_custom_node_installed(x) for x in comfyNodeRequest.data } + response = { f"{x.username}/{x.repoName}" : comfyui_downloader.is_custom_node_installed(x) for x in comfyNodeRequest.data} return jsonify(response) @@ -407,7 +410,7 @@ def install_custom_nodes(comfyNodeRequest: ComfyUICustomNodesDownloadRequest): try: for x in comfyNodeRequest.data: comfyui_downloader.download_custom_node(x) - return jsonify({ f"{x.username}/{x.reponame}" : {"success": True, "errorMessage": ""} for x in comfyNodeRequest.data }) + return jsonify({ f"{x.username}/{x.repoName}" : {"success": True, "errorMessage": ""} for x in comfyNodeRequest.data}) except Exception as e: return jsonify({'error_message': f'failed to at least one custom node due to {e}'}), 501 diff --git a/service/web_request_bodies.py b/service/web_request_bodies.py index e570102b..47aab912 100644 --- a/service/web_request_bodies.py +++ b/service/web_request_bodies.py @@ -19,7 +19,7 @@ class DownloadModelRequestBody: @marshmallow_dataclass.dataclass class ComfyUICustomNodesGithubRepoId: username: str - reponame: str + repoName: str @marshmallow_dataclass.dataclass class ComfyUICustomNodesDownloadRequest: