Skip to content

Commit

Permalink
minor bugfixes
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Esser <[email protected]>
  • Loading branch information
florianesser-tng committed Dec 5, 2024
1 parent 7bfc137 commit 5402216
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -133,21 +132,25 @@ 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})),
headers: {
"Content-Type": "application/json"
}
})
return reponse
return response
}
function concludeDialog(isInstallationSuccessful: boolean) {
Expand Down
2 changes: 1 addition & 1 deletion service/comfyui_downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand Down

0 comments on commit 5402216

Please sign in to comment.