import gradio as gr import os import sys from pathlib import Path models = [ "Yntec/photoMovieRealistic", "Yntec/a-ZovyaRPGV3VAE", "Yntec/a-ZoviaRPGArtistV2VAE", "Yntec/InsaneRealisticCVAE", "Yntec/Lunar", "Yntec/LunarLuma", "Yntec/QToriReloaded", "Yntec/Ninja-Diffusers", "Yntec/ChildrenStoriesAnime", "Yntec/DucHaitenAnime768", "Yntec/DucHaitenClassicAnime768", "Yntec/WesternAnimation", "Yntec/GOLDFish", "Yntec/Rainbowsphere", "Yntec/DreamAnything", "Yntec/yabalMixTrue25D_v2_VAE", "dreamlike-art/dreamlike-anime-1.0", "Yntec/DucHaiten-Retro-Diffusers", "Hemlok/QuinceMix", "Yntec/KIDSILLUSTRATIONS", "Yntec/COOLKIDSV2", "Yntec/Pavo-Mix-Diffusers", "Yntec/DucHaitenAIart-beta", "Ojimi/anime-kawai-diffusion", "LottePeisch/RevAnimated-Diffusers", "Linaqruf/animagine-xl", "Envvi/Inkpunk-Diffusion", "Birchlabs/waifu-diffusion-xl-unofficial", "digiplay/KawaiiRealisticAnimeMix_A0.3", "digiplay/AI-infinity-V1-fp16", "Yntec/photoMovieX", "Yntec/OrangeRemix", "digiplay/majicMIX_realistic_v6", "digiplay/LuckyStrikeMix1.05_Lovelylady", "digiplay/nk15_diffusers", "digiplay/TWingshadow_v1.2", "digiplay/bluePencilRealistic_v01", "digiplay/OnlyAnime_v2.3", "digiplay/LemonCreami", "digiplay/LunarDiffusion_v1.27", "Linaqruf/hermitage-xl", "ddPn08/SwimInLatent", ] current_model = models[0] text_gen1=gr.Interface.load("spaces/Omnibus/MagicPrompt-Stable-Diffusion_link") models2=[ gr.Interface.load(f"models/{models[0]}",live=True,preprocess=False), gr.Interface.load(f"models/{models[1]}",live=True,preprocess=False), gr.Interface.load(f"models/{models[2]}",live=True,preprocess=False), gr.Interface.load(f"models/{models[3]}",live=True,preprocess=False), gr.Interface.load(f"models/{models[4]}",live=True,preprocess=False), gr.Interface.load(f"models/{models[5]}",live=True,preprocess=False), gr.Interface.load(f"models/{models[6]}",live=True,preprocess=False), gr.Interface.load(f"models/{models[7]}",live=True,preprocess=False), gr.Interface.load(f"models/{models[8]}",live=True,preprocess=False), gr.Interface.load(f"models/{models[9]}",live=True,preprocess=False), gr.Interface.load(f"models/{models[10]}",live=True,preprocess=False), gr.Interface.load(f"models/{models[11]}",live=True,preprocess=False), gr.Interface.load(f"models/{models[12]}",live=True,preprocess=False), gr.Interface.load(f"models/{models[13]}",live=True,preprocess=False), gr.Interface.load(f"models/{models[14]}",live=True,preprocess=False), gr.Interface.load(f"models/{models[15]}",live=True,preprocess=False), gr.Interface.load(f"models/{models[16]}",live=True,preprocess=False), gr.Interface.load(f"models/{models[17]}",live=True,preprocess=False), gr.Interface.load(f"models/{models[18]}",live=True,preprocess=False), gr.Interface.load(f"models/{models[19]}",live=True,preprocess=False), gr.Interface.load(f"models/{models[20]}",live=True,preprocess=False), gr.Interface.load(f"models/{models[21]}",live=True,preprocess=False), gr.Interface.load(f"models/{models[22]}",live=True,preprocess=False), gr.Interface.load(f"models/{models[23]}",live=True,preprocess=False), gr.Interface.load(f"models/{models[24]}",live=True,preprocess=False), gr.Interface.load(f"models/{models[25]}",live=True,preprocess=False), gr.Interface.load(f"models/{models[26]}",live=True,preprocess=False), gr.Interface.load(f"models/{models[27]}",live=True,preprocess=False), gr.Interface.load(f"models/{models[28]}",live=True,preprocess=False), gr.Interface.load(f"models/{models[29]}",live=True,preprocess=False), gr.Interface.load(f"models/{models[30]}",live=True,preprocess=False), gr.Interface.load(f"models/{models[31]}",live=True,preprocess=False), gr.Interface.load(f"models/{models[32]}",live=True,preprocess=False), gr.Interface.load(f"models/{models[33]}",live=True,preprocess=False), gr.Interface.load(f"models/{models[34]}",live=True,preprocess=False), gr.Interface.load(f"models/{models[35]}",live=True,preprocess=False), gr.Interface.load(f"models/{models[36]}",live=True,preprocess=False), gr.Interface.load(f"models/{models[37]}",live=True,preprocess=False), gr.Interface.load(f"models/{models[38]}",live=True,preprocess=False), gr.Interface.load(f"models/{models[39]}",live=True,preprocess=False), gr.Interface.load(f"models/{models[40]}",live=True,preprocess=False), gr.Interface.load(f"models/{models[41]}",live=True,preprocess=False), ] def text_it1(inputs,text_gen1=text_gen1): go_t1=text_gen1(inputs) return(go_t1) def set_model(current_model): current_model = models[current_model] return gr.update(label=(f"{current_model}")) def send_it1(inputs, model_choice): proc1=models2[model_choice] output1=proc1(inputs) return(output1) css="""""" with gr.Blocks(css=css) as myface: gr.HTML() with gr.Row(): with gr.Tab("说明"): gr.HTML("""