mirror of
https://github.com/lllyasviel/Fooocus.git
synced 2026-08-16 13:13:16 +02:00
allow ar config
This commit is contained in:
@@ -51,48 +51,6 @@ fooocus_expansion = "Fooocus V2"
|
||||
legal_style_names = [fooocus_expansion] + style_keys
|
||||
|
||||
|
||||
SD_XL_BASE_RATIOS = {
|
||||
"0.5": (704, 1408),
|
||||
"0.52": (704, 1344),
|
||||
"0.57": (768, 1344),
|
||||
"0.6": (768, 1280),
|
||||
"0.68": (832, 1216),
|
||||
"0.72": (832, 1152),
|
||||
"0.78": (896, 1152),
|
||||
"0.82": (896, 1088),
|
||||
"0.88": (960, 1088),
|
||||
"0.94": (960, 1024),
|
||||
"1.0": (1024, 1024),
|
||||
"1.07": (1024, 960),
|
||||
"1.13": (1088, 960),
|
||||
"1.21": (1088, 896),
|
||||
"1.29": (1152, 896),
|
||||
"1.38": (1152, 832),
|
||||
"1.46": (1216, 832),
|
||||
"1.67": (1280, 768),
|
||||
"1.75": (1344, 768),
|
||||
"1.91": (1344, 704),
|
||||
"2.0": (1408, 704),
|
||||
"2.09": (1472, 704),
|
||||
"2.4": (1536, 640),
|
||||
"2.5": (1600, 640),
|
||||
"2.89": (1664, 576),
|
||||
"3.0": (1728, 576),
|
||||
}
|
||||
|
||||
aspect_ratios = {}
|
||||
|
||||
# import math
|
||||
|
||||
for k, (w, h) in SD_XL_BASE_RATIOS.items():
|
||||
txt = f'{w}×{h}'
|
||||
|
||||
# gcd = math.gcd(w, h)
|
||||
# txt += f' {w//gcd}:{h//gcd}'
|
||||
|
||||
aspect_ratios[txt] = (w, h)
|
||||
|
||||
|
||||
def apply_style(style, positive):
|
||||
p, n = styles[style]
|
||||
return p.replace('{prompt}', positive), n
|
||||
|
||||
Reference in New Issue
Block a user