diff --git a/flow/constants.py b/flow/constants.py index 5375e98..4868277 100644 --- a/flow/constants.py +++ b/flow/constants.py @@ -3,7 +3,7 @@ from pathlib import Path import re APP_NAME = "Flow" -APP_VERSION = "0.4.8" +APP_VERSION = "0.4.9" FLOWMSG = f"\033[38;5;129mFlow - {APP_VERSION}\033[0m" APP_CONFIGS = [] @@ -58,6 +58,7 @@ "afl_pulid_flux_GGUF", "afl_reactor" "5otvy-cogvideox-orbit-left-lora", + "umbi9-hunyuan-text-to-video" ] NODE_CLASS_MAPPINGS = {} diff --git a/pyproject.toml b/pyproject.toml index 40006c1..cba05c9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "comfyui-disty-flow" description = "Flow is a custom node designed to provide a more user-friendly interface for ComfyUI by acting as an alternative user interface for running workflows. It is not a replacement for workflow creation.\nFlow is currently in the early stages of development, so expect bugs and ongoing feature enhancements. With your support and feedback, Flow will settle into a steady stream." -version = "0.4.8" +version = "0.4.9" license = {file = "LICENSE"} [project.urls] diff --git a/web/core/js/common/components/Dropdown.js b/web/core/js/common/components/Dropdown.js index 8de0109..6bd88ce 100644 --- a/web/core/js/common/components/Dropdown.js +++ b/web/core/js/common/components/Dropdown.js @@ -30,14 +30,31 @@ export default class Dropdown { } populate(data) { - const loaderData = data[Object.keys(data)[0]]; - if (!loaderData.input.required[this.config.key]) { + const firstKey = Object.keys(data)[0]; + const loaderData = data[firstKey]; + + let inputData = loaderData.input.required[this.config.key]; + + if (!inputData) { + console.warn(`Required input for key "${this.config.key}" is missing. Checking for optional input.`); + inputData = loaderData.input.optional ? loaderData.input.optional[this.config.key] : undefined; + } + + if (!inputData) { this.displayMissingComponentMessage(); return; } - populateDropdown(this.config.id, loaderData.input.required[this.config.key][0], this.config.label, this.config.nodePath, this.workflow); + populateDropdown( + this.config.id, + inputData[0], + this.config.label, + this.config.nodePath, + this.workflow + ); } - + + + displayMissingComponentMessage() { if (this.loaderContainer) { this.loaderContainer.innerHTML = '';