From 5402216dc82ad2cc3f07758b77dd92358fee58a2 Mon Sep 17 00:00:00 2001 From: Florian Esser Date: Thu, 5 Dec 2024 15:56:52 +0100 Subject: [PATCH] minor bugfixes Signed-off-by: Florian Esser --- .../comfyUIDownloadDialog/ComfyUIDownloadDialog.vue | 13 ++++++++----- service/comfyui_downloader.py | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/WebUI/src/components/comfyUIDownloadDialog/ComfyUIDownloadDialog.vue b/WebUI/src/components/comfyUIDownloadDialog/ComfyUIDownloadDialog.vue index 1bd4eb96..df53a926 100644 --- a/WebUI/src/components/comfyUIDownloadDialog/ComfyUIDownloadDialog.vue +++ b/WebUI/src/components/comfyUIDownloadDialog/ComfyUIDownloadDialog.vue @@ -73,7 +73,6 @@ import {useGlobalSetup} from "@/assets/js/store/globalSetup.ts"; import {useImageGeneration} from "@/assets/js/store/imageGeneration.ts"; - const globalSetup = useGlobalSetup() const imageGenerationSettings = useImageGeneration() @@ -133,13 +132,17 @@ function triggerInstallComfyUI() { } function triggerInstallCustomNodes() { + console.info("workflows:", imageGenerationSettings.workflows.filter(w => w.backend === 'comfyui')) const uniqueCustomNodes = new Set(imageGenerationSettings.workflows.filter(w => w.backend === 'comfyui').flatMap((item) => item.comfyUIRequirements.customNodes)) - const toBeInstalledCustomNodes = [] - for (nodeName in uniqueCustomNodes) { + + const toBeInstalledCustomNodes: ComfyUICustomNodesRequestParameters[] = [] + console.info("custom nodes", uniqueCustomNodes) + for (var nodeName of uniqueCustomNodes) { const [username, repoName] = nodeName.replace(" ", "").split("/") - const nodeID = ComfyUICustomNodesRequestParameters(username, repoName) + const nodeID: ComfyUICustomNodesRequestParameters = {username: username, repoName: repoName} toBeInstalledCustomNodes.push(nodeID) } + console.info("to be installed: ", toBeInstalledCustomNodes) const response = fetch(`${globalSetup.apiHost}/api/comfy-ui/load_custom_nodes`, { method: 'POST', body: JSON.stringify(toRaw({'data': toBeInstalledCustomNodes})), @@ -147,7 +150,7 @@ function triggerInstallCustomNodes() { "Content-Type": "application/json" } }) - return reponse + return response } function concludeDialog(isInstallationSuccessful: boolean) { diff --git a/service/comfyui_downloader.py b/service/comfyui_downloader.py index a409b2af..6cd5ddbd 100644 --- a/service/comfyui_downloader.py +++ b/service/comfyui_downloader.py @@ -79,7 +79,7 @@ def get_unzipping_command(): def _install_git_repo(git_repo_url: str, target_dir: str): try: aipg_utils.remove_existing_filesystem_resource(target_dir) - aipg_utils.call_subprocess(f"{service_config.git.get('exePath')} clone {git_repo_url} {target_dir}") + aipg_utils.call_subprocess(f"{service_config.git.get('exePath')} clone {git_repo_url} '{target_dir}'") logging.info(f"Cloned {git_repo_url} into {target_dir}") except Exception as e: logging.warning(f"git cloned failed with exception {e}. Cleaning up failed resources.")