Skip to content

Commit 088d1a6

Browse files
committed
Add batch_size to ResolutionMaster outputs and UI
Updated aztoolkit.py to include batch_size in the return values and output names of ResolutionMaster. Modified ResolutionMaster.js to display a pink 'LAT' label for the latent output and clarified the rescale value display.
1 parent 6e1d9fa commit 088d1a6

2 files changed

Lines changed: 12 additions & 4 deletions

File tree

aztoolkit.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ def INPUT_TYPES(cls):
4444
},
4545
}
4646

47-
RETURN_TYPES = ("INT", "INT", "FLOAT", "LATENT")
48-
RETURN_NAMES = ("width", "height", "rescale_factor", "latent")
47+
RETURN_TYPES = ("INT", "INT", "FLOAT", "INT", "LATENT")
48+
RETURN_NAMES = ("width", "height", "rescale_factor", "batch_size", "latent")
4949
FUNCTION = "main"
5050
CATEGORY = "utils/azToolkit"
5151

@@ -93,4 +93,4 @@ def main(self, mode, width, height, auto_detect, rescale_mode, rescale_value, ba
9393
# Generate latent tensor
9494
latent = torch.zeros([batch_size, 4, height // 8, width // 8], device=self.device)
9595

96-
return (width, height, rescale_factor, {"samples": latent})
96+
return (width, height, rescale_factor, batch_size, {"samples": latent})

js/ResolutionMaster.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ class ResolutionMasterCanvas {
533533
ctx.fillStyle = this.hoverElement === 'heightValueArea' ? "#F89" : "#F89";
534534
ctx.fillText(this.heightWidget.value.toString(), node.size[0] - 20, y_offset_2);
535535

536-
// Rescale value (non-clickable)
536+
// Rescale value (non-clickable, green text)
537537
ctx.fillStyle = "#9F8";
538538
ctx.fillText(props.rescaleValue.toFixed(2), node.size[0] - 20, y_offset_3);
539539

@@ -558,6 +558,14 @@ class ResolutionMasterCanvas {
558558

559559
ctx.fillStyle = this.hoverElement === 'batchSizeValueArea' ? "#FAB" : "#F8B";
560560
ctx.fillText(this.batchSizeWidget.value.toString(), node.size[0] - 20, y_offset_4);
561+
562+
// Latent output label - pink "lat" text only (non-clickable, read-only)
563+
const y_offset_5 = 5 + (LiteGraph.NODE_SLOT_HEIGHT * 4.5);
564+
565+
ctx.fillStyle = "#F8B"; // Pink text color (same as batch_size)
566+
ctx.font = "bold 12px Arial";
567+
ctx.textAlign = "right";
568+
ctx.fillText("LAT", node.size[0] - 20, y_offset_5);
561569
}
562570
}
563571

0 commit comments

Comments
 (0)