Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1a2c5db176 | ||
|
|
d233bdebeb | ||
|
|
dd66d1fbec | ||
|
|
18a5c1ecde | ||
|
|
11724a0aac |
@@ -8,6 +8,9 @@ on:
|
||||
paths:
|
||||
- "pyproject.toml"
|
||||
|
||||
permissions:
|
||||
issues: write
|
||||
|
||||
jobs:
|
||||
publish-node:
|
||||
name: Publish Custom Node to registry
|
||||
@@ -19,7 +22,7 @@ jobs:
|
||||
with:
|
||||
submodules: true
|
||||
- name: Publish Custom Node
|
||||
uses: Comfy-Org/publish-node-action@main
|
||||
uses: Comfy-Org/publish-node-action@v1
|
||||
with:
|
||||
## Add your own personal access token to your Github Repository secrets and reference it here.
|
||||
personal_access_token: ${{ secrets.REGISTRY_ACCESS_TOKEN }}
|
||||
|
||||
@@ -1,7 +1,54 @@
|
||||
This is a pretty simple node that will output an int of width and height for easy piping to a sampler.
|
||||
This is a pretty simple node that will output an int of width and height for easy piping to a sampler, after selecting an aspect ratio from a dropdown menu.
|
||||
|
||||
PRs welcome for additional video resolutions!
|
||||
|
||||
Setup is pretty simple:
|
||||
|
||||

|
||||
|
||||
Below are the current resolutions.
|
||||
|
||||
```
|
||||
"256x256 (1:1)",
|
||||
"256x384 (2:3)",
|
||||
"384x256 (3:2)",
|
||||
"320x448 (5:7)",
|
||||
"448x320 (7:5)",
|
||||
"384x512 (3:4)",
|
||||
"512x384 (4:3)",
|
||||
"512x512 (1:1)",
|
||||
"512x768 (2:3)",
|
||||
"768x512 (3:2)",
|
||||
"512x640 (4:5)",
|
||||
"640x512 (5:4)",
|
||||
"448x768 (9:16)",
|
||||
"768x448 (16:9)",
|
||||
"576x1024 (9:16)",
|
||||
"704x1408 (1:2)",
|
||||
"704x1344 (13:25)",
|
||||
"768x1344 (4:7)",
|
||||
"768x1280 (3:5)",
|
||||
"832x1216 (2:3)",
|
||||
"832x1152 (5:7)",
|
||||
"896x1152 (7:9)",
|
||||
"896x1088 (4:5)",
|
||||
"960x1088 (8:9)",
|
||||
"960x1024 (15:16)",
|
||||
"1024x1024 (1:1)",
|
||||
"1024x960 (16:15)",
|
||||
"1088x960 (9:8)",
|
||||
"1088x896 (5:4)",
|
||||
"1152x896 (9:7)",
|
||||
"1152x832 (7:5)",
|
||||
"1216x832 (3:2)",
|
||||
"1280x768 (5:3)",
|
||||
"1344x768 (7:4)",
|
||||
"1344x704 (16:9)",
|
||||
"1024x576 (16:9)",
|
||||
"1408x704 (2:1)",
|
||||
"1472x704 (21:10)",
|
||||
"1536x640 (12:5)",
|
||||
"1600x640 (5:2)",
|
||||
"1664x576 (3:1)",
|
||||
"1728x576 (3:1)"
|
||||
```
|
||||
|
||||
@@ -6,48 +6,54 @@ class HunyuanResolutions:
|
||||
@classmethod
|
||||
def INPUT_TYPES(s):
|
||||
aspect_ratios = [
|
||||
"=SQUARE=",
|
||||
"256x256 (1:1)",
|
||||
"256x384 (2:3)",
|
||||
"384x256 (3:2)",
|
||||
"320x448 (5:7)",
|
||||
"448x320 (7:5)",
|
||||
"384x512 (3:4)",
|
||||
"512x384 (4:3)",
|
||||
"512x512 (1:1)",
|
||||
"512x768 (2:3)",
|
||||
"768x512 (3:2)",
|
||||
"512x640 (4:5)",
|
||||
"640x512 (5:4)",
|
||||
"448x768 (9:16)",
|
||||
"768x448 (16:9)",
|
||||
"576x1024 (9:16)",
|
||||
"704x1408 (1:2)",
|
||||
"704x1344 (13:25)",
|
||||
"768x1344 (4:7)",
|
||||
"768x1280 (3:5)",
|
||||
"832x1216 (2:3)",
|
||||
"832x1152 (5:7)",
|
||||
"896x1152 (7:9)",
|
||||
"896x1088 (4:5)",
|
||||
"960x1088 (8:9)",
|
||||
"960x1024 (15:16)",
|
||||
"768x768 (1:1)",
|
||||
"1024x1024 (1:1)",
|
||||
"1024x960 (16:15)",
|
||||
"1088x960 (9:8)",
|
||||
"1088x896 (5:4)",
|
||||
"1152x896 (9:7)",
|
||||
"1152x832 (7:5)",
|
||||
"1216x832 (3:2)",
|
||||
"1280x768 (5:3)",
|
||||
"1344x768 (7:4)",
|
||||
|
||||
"=VERTICAL=",
|
||||
"960x1024 (15:16)",
|
||||
"960x1088 (8:9)",
|
||||
"896x1088 (4:5)",
|
||||
"512x640 (4:5)",
|
||||
"896x1152 (7:9)",
|
||||
"384x512 (3:4)",
|
||||
"832x1152 (5:7)",
|
||||
"320x448 (5:7)",
|
||||
"832x1216 (2:3)",
|
||||
"256x384 (2:3)",
|
||||
"512x768 (2:3)",
|
||||
"768x1280 (3:5)",
|
||||
"448x768 (9:16)",
|
||||
"768x1344 (4:7)",
|
||||
"576x1024 (9:16)",
|
||||
"704x1344 (13:25)",
|
||||
"704x1408 (1:2)",
|
||||
|
||||
"=HORIZONTAL=",
|
||||
"1728x576 (3:1)",
|
||||
"1664x576 (3:1)",
|
||||
"1600x640 (5:2)",
|
||||
"1536x640 (12:5)",
|
||||
"1472x704 (21:10)",
|
||||
"1408x704 (2:1)",
|
||||
"1344x704 (16:9)",
|
||||
"1024x576 (16:9)",
|
||||
"1408x704 (2:1)",
|
||||
"1472x704 (21:10)",
|
||||
"1536x640 (12:5)",
|
||||
"1600x640 (5:2)",
|
||||
"1664x576 (3:1)",
|
||||
"1728x576 (3:1)"
|
||||
"1344x768 (7:4)",
|
||||
"768x448 (16:9)",
|
||||
"1280x768 (5:3)",
|
||||
"384x256 (3:2)",
|
||||
"768x512 (3:2)",
|
||||
"1216x832 (3:2)",
|
||||
"448x320 (7:5)",
|
||||
"1152x832 (7:5)",
|
||||
"512x384 (4:3)",
|
||||
"1152x896 (9:7)",
|
||||
"640x512 (5:4)",
|
||||
"1088x896 (5:4)",
|
||||
"1088x960 (9:8)",
|
||||
"1024x960 (16:15)",
|
||||
]
|
||||
|
||||
return {"required": {
|
||||
@@ -60,11 +66,10 @@ class HunyuanResolutions:
|
||||
CATEGORY = "Utilities"
|
||||
|
||||
def generate(self, resolution):
|
||||
# Parse resolution string to get dimensions
|
||||
if resolution.startswith('='): return (256, 256)
|
||||
dimensions = resolution.split(' ')[0]
|
||||
width, height = map(int, dimensions.split('x'))
|
||||
|
||||
# Ensure dimensions are multiples of 16
|
||||
width = int((width // 16) * 16)
|
||||
height = int((height // 16) * 16)
|
||||
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
[project]
|
||||
name = "videoresolutions"
|
||||
description = "A super simple node that outputs common video resolutions as 2 integers for Hunyuan and others!"
|
||||
version = "1.0.0"
|
||||
version = "1.0.2"
|
||||
license = {file = "LICENSE"}
|
||||
|
||||
[project.urls]
|
||||
@@ -9,6 +9,6 @@ Repository = "https://github.com/HellerCommaA/ComfyUI-VideoResolutions"
|
||||
# Used by Comfy Registry https://comfyregistry.org
|
||||
|
||||
[tool.comfy]
|
||||
PublisherId = ""
|
||||
PublisherId = "hellercommaa"
|
||||
DisplayName = "ComfyUI-VideoResolutions"
|
||||
Icon = ""
|
||||
|
||||
Reference in New Issue
Block a user