Fix resolution list.

This commit is contained in:
bradsec
2023-08-18 16:54:32 +10:00
parent 8927bd6a2f
commit 96aeeefa45
2 changed files with 29 additions and 2 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ A custom node for Stable Diffusion [ComfyUI](https://github.com/comfyanonymous/C
# Change to the directory you installed ComfyUI # Change to the directory you installed ComfyUI
cd pathTo/ComfyUI cd pathTo/ComfyUI
# Change to the custom_nodes directory # Change to the custom_nodes directory ie.
cd custom_nodes cd custom_nodes
``` ```
+28 -1
View File
@@ -1,7 +1,34 @@
# Define resolution presets # Define resolution presets
# Resolutions which appear to work well for SDXL as used in https://github.com/lllyasviel/Fooocus # Resolutions which appear to work well for SDXL as used in https://github.com/lllyasviel/Fooocus
BASE_RESOLUTIONS = [(1024, 1024), (704, 1408), (704, 1344), (768, 1344), (768, 1280), (832, 1216), (832, 1152), (896, 1152), (896, 1088), (960, 1088), (960, 1024), (1024, 960), (1088, 960), (1088, 896), (1152, 896), (1152, 832), (1216, 832), (1280, 768), (1344, 768), (1344, 704), (1408, 704), (1472, 704), (1536, 640), (1600, 640), (1664, 576), (1728, 576)] BASE_RESOLUTIONS = [
(1024, 1024),
(704, 1408),
(704, 1344),
(768, 1344),
(768, 1280),
(832, 1216),
(832, 1152),
(896, 1152),
(896, 1088),
(960, 1088),
(960, 1024),
(1024, 960),
(1088, 960),
(1088, 896),
(1152, 896),
(1152, 832),
(1216, 832),
(1280, 768),
(1344, 768),
(1344, 704),
(1408, 704),
(1472, 704),
(1536, 640),
(1600, 640),
(1664, 576),
(1728, 576)
]
# Create a list of resolution strings for the drop-down menu # Create a list of resolution strings for the drop-down menu
resolution_strings = [f"{width}x{height}" for width, height in BASE_RESOLUTIONS] resolution_strings = [f"{width}x{height}" for width, height in BASE_RESOLUTIONS]