import json # 获取C26中有哪些样式 def C26_get_sdxl_styles(): files = ['sdxl_styles_sai.json', 'sdxl_styles_twri.json'] SDXL_STYLES = [] for json_file in files: with open(json_file, 'r', encoding="utf-8") as fi: data = json.load(fi) for x in data: SDXL_STYLES.append(x['name']) return SDXL_STYLES print(len(C26_get_sdxl_styles()))