From 8f93d820bc9c4e737d21adf8b15a7fdf4708c398 Mon Sep 17 00:00:00 2001 From: space-nuko <24979496+space-nuko@users.noreply.github.com> Date: Fri, 9 Jun 2023 22:39:54 -0500 Subject: [PATCH] Fix order --- execution.py | 5 ----- web/extensions/core/showGrid.js | 2 +- web/scripts/app.js | 6 +----- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/execution.py b/execution.py index 9ee90adf4..ea346c7fa 100644 --- a/execution.py +++ b/execution.py @@ -135,15 +135,10 @@ def get_input_data_batches(input_data_all): if not inherit_id or axis_id is None: axis_id = str(uuid.uuid4()) - pp(input_to_index) - pp(input_to_values) - pp(index_to_values) - indices = list(itertools.product(*index_to_coords)) combinations = list(itertools.product(*index_to_values)) pp(indices) - pp(combinations) for i, indices_set in enumerate(indices): combination = combinations[i] diff --git a/web/extensions/core/showGrid.js b/web/extensions/core/showGrid.js index 761052c1d..52e25e6c0 100644 --- a/web/extensions/core/showGrid.js +++ b/web/extensions/core/showGrid.js @@ -266,7 +266,7 @@ app.registerExtension({ imageSizeInput.addEventListener("input", () => { this.imageSize = parseInt(imageSizeInput.value); - const ratio = Math.min(this.imageSize / natWidth, this.imageSize / natHeight); + const ratio = Math.min(this.imageSize / this.naturalWidth, this.imageSize / this.naturalHeight); const newWidth = this.naturalWidth * ratio; const newHeight = this.naturalHeight * ratio; this.imageWidth = newWidth; diff --git a/web/scripts/app.js b/web/scripts/app.js index d1423b6f4..b52412993 100644 --- a/web/scripts/app.js +++ b/web/scripts/app.js @@ -1083,10 +1083,6 @@ export class ComfyApp { let sortedKeys = Object.keys(promptInput.inputs); sortedKeys.sort((a, b) => a.localeCompare(b)); - // Then reverse the order since we're traversing the graph upstream, - // so application order of the inputs comes out backwards - sortedKeys = sortedKeys.reverse(); - for (const inputName of sortedKeys) { const input = promptInput.inputs[inputName]; if (typeof input === "object" && "__inputType__" in input) { @@ -1406,7 +1402,7 @@ export class ComfyApp { for (let widget of node.widgets) { if (node.type == "KSampler" || node.type == "KSamplerAdvanced") { if (widget.name == "sampler_name") { - if (widget.value.startsWith("sample_")) { + if (typeof widget.value === "string" && widget.value.startsWith("sample_")) { widget.value = widget.value.slice(7); } }