From 96aeeefa458f47612eab0c75ac963067d8a56a25 Mon Sep 17 00:00:00 2001 From: bradsec Date: Fri, 18 Aug 2023 16:54:32 +1000 Subject: [PATCH] Fix resolution list. --- README.md | 2 +- resolution_selector.py | 29 ++++++++++++++++++++++++++++- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b0f5b4c..8c44800 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ A custom node for Stable Diffusion [ComfyUI](https://github.com/comfyanonymous/C # Change to the directory you installed ComfyUI cd pathTo/ComfyUI -# Change to the custom_nodes directory +# Change to the custom_nodes directory ie. cd custom_nodes ``` diff --git a/resolution_selector.py b/resolution_selector.py index 7629345..fa258d7 100644 --- a/resolution_selector.py +++ b/resolution_selector.py @@ -1,7 +1,34 @@ # Define resolution presets # 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 resolution_strings = [f"{width}x{height}" for width, height in BASE_RESOLUTIONS]