Files
Unified_Dashboard_Suite_Go/scratch/test_faithful_mapping.py
T

101 lines
4.0 KiB
Python
Raw Normal View History

import json
with open("/home/creserver/Desktop/Vaishno_workspace/Jsons/credentials_23-10-2026.json") as f:
creds = json.load(f)["data"]
# Map creds to original sections
sec_map = {
# sec-flux-fill (hue: 268)
"Stable_Diffusion_Hair_Color_Changer_And_Hair_Style_Changer": "sec-flux-fill",
"Stable_Diffusion_Eye_Changer": "sec-flux-fill",
"Flux_Dress_Changer": "sec-flux-fill",
"Flux_Couple_Dress_Changer": "sec-flux-fill",
# sec-flux-kontext (hue: 335)
"Flux_Hairstyles": "sec-flux-kontext",
"Flux_Sculpture_Effect": "sec-flux-kontext",
"Flux_Silhouette_Effect": "sec-flux-kontext",
"Flux_Glasses": "sec-flux-kontext",
"Flux_Cartoon": "sec-flux-kontext",
"Flux_Background_Changer": "sec-flux-kontext",
"Vintage_Look": "sec-flux-kontext",
"Stable_Diffusion_Headshot": "sec-flux-kontext",
"Stable_Diffusion_Head_Cartoon_Effects": "sec-flux-kontext",
"Stable_Diffusion_Modified_Head_Cartoon_Effects": "sec-flux-kontext",
"Stable_Diffusion_Comic_Coverpage_Generator": "sec-flux-kontext",
# sec-ml-models (hue: 205)
"Cre_Aws_Waifu2x_Model": "sec-ml-models",
"Cre_Aws_Colorization_Model": "sec-ml-models",
"Cre_Aws_Old_Photo_Restore_Model": "sec-ml-models",
"Cre_Aws_Advance_Image_Segment_Anything_Dichotomous_Model": "sec-ml-models",
"Cre_Aws_cloth_segmentation_Model": "sec-ml-models",
"Cloth_Segmentation_Model_V2": "sec-ml-models",
"dress_segmentation_auto": "sec-ml-models",
"Cre_Aws_Lama_Cleaner_Model": "sec-ml-models",
"Cre_Aws_Background_Remover_Model": "sec-ml-models",
"Cre_Aws_Cartoon_Model": "sec-ml-models",
"Face_Coordinates": "sec-ml-models",
"Cre_Face_With_Hair_Segment_Model": "sec-ml-models",
"Cre_Cartoonify_Caricature_Effects_Model": "sec-ml-models",
"Cre_Hair_Detection_Segment_Model": "sec-ml-models",
"Stable_Diffusion_Hair_Segmentation": "sec-ml-models",
"Eye_Bag_Remover": "sec-ml-models",
"Skin_Detection": "sec-ml-models",
"Sky_Detection": "sec-ml-models",
"Pose_Detection": "sec-ml-models",
"Caricature_Avatar": "sec-ml-models",
"Teeth_Whitener": "sec-ml-models",
"Blemish_Remover": "sec-ml-models",
"Eye_Redness_Remover": "sec-ml-models",
"Polaroid_Effect": "sec-ml-models",
"Face_Swapper": "sec-ml-models",
"Stable_Diffusion_Relighter": "sec-ml-models",
"Face_Analyzer": "sec-ml-models",
"Trendy": "sec-ml-models",
# sec-comfyui (hue: 28)
"Multi_Segmentation_Model": "sec-comfyui",
"Stable_Diffusion_Dress_Changer": "sec-comfyui",
# sec-sd15 (hue: 150)
"Stable_Diffusion_Image_To_Image_Model": "sec-sd15",
"Stable_Diffusion_Realistic_Avatar": "sec-sd15",
"Stable_Diffusion_Art_Style_Transfer": "sec-sd15",
"Stable_Diffusion_Reaslistic_Background_Changer": "sec-sd15",
"Stable_Diffusion_Silhouette_Maker": "sec-sd15",
"Stable_Diffusion_Caricature_Effects": "sec-sd15",
"Stable_Diffusion_Comic_Generator": "sec-sd15",
"Stable_Diffusion_Photo_2_Caricature": "sec-sd15",
"Stable_Diffusion_Caricature_Hair_Face_Effect": "sec-sd15",
"Stable_Diffusion_New_Cartoon Effects": "sec-sd15",
"Stable_Diffusion_Artistic_Effects": "sec-sd15",
# sec-sdxl (hue: 232)
"Stable_Diffusion_Text_To_Image_Model": "sec-sdxl",
"Stable_Diffusion_Outpainting": "sec-sdxl",
"Stable_Diffusion_Inpaint_Object_Replacer": "sec-sdxl",
"Stable_Diffusion_Dress_Pattern": "sec-sdxl",
"Stable_Diffusion_Blend_Collage": "sec-sdxl",
"Stable_Diffusion_Dress_Replacer": "sec-sdxl",
"Stable_Diffusion_Text_To_Cartoon_Character_Generator": "sec-sdxl",
"Stable_Diffusion_Text_To_Caricature": "sec-sdxl",
"Stable_Diffusion_Face_Expressions_Changer": "sec-sdxl",
# sec-other (hue: 45)
"Credits_Limit": "sec-other",
"Feedbacks": "sec-other",
"Reports": "sec-other"
}
print(f"Total mapped creds: {len(sec_map)}")
for c in creds:
k = c["api_key"]
if k not in sec_map:
print(f"MISSING IN SEC_MAP: {k}")
from collections import Counter
c = Counter(sec_map.values())
for sid, count in c.items():
print(f" {sid}: {count} APIs")