import gradio as gr import os import sys from pathlib import Path import time import random from PIL import Image from diffusers import DiffusionPipeline repo_id = "runwayml/stable-diffusion-v1-5" pipe = DiffusionPipeline.from_pretrained(repo_id) print(pipe) m_pdir="/content/drive/MyDrive/aipic001/" models =[ "", "CompVis/stable-diffusion-v1-4", "runwayml/stable-diffusion-v1-5", "prompthero/openjourney", #4 "stabilityai/stable-diffusion-2-1", "stabilityai/stable-diffusion-2-1-base", "andite/anything-v4.0", "Linaqruf/anything-v3.0", "eimiss/EimisAnimeDiffusion_1.0v", "nitrosocke/Nitro-Diffusion", #10 "wavymulder/portraitplus", "22h/vintedois-diffusion-v0-1", "dreamlike-art/dreamlike-photoreal-2.0", #11 "dreamlike-art/dreamlike-diffusion-1.0", "wavymulder/Analog-Diffusion", "nitrosocke/redshift-diffusion", "claudfuen/photorealistic-fuen-v1", "prompthero/openjourney-v2", "johnslegers/epic-diffusion", "nitrosocke/Arcane-Diffusion", "darkstorm2150/Protogen_x5.8_Official_Release", ] model_1=models[1] model_2=models[2] model_3=models[3] model_4=models[4] model_5=models[5] model_6=models[6] model_7=models[7] model_8=models[8] model_9=models[9] model_10=models[10] model_11=models[11] model_12=models[12] model_13=models[13] model_14=models[14] model_15=models[15] model_16=models[16] model_17=models[17] model_18=models[18] model_19=models[19] model_20=models[20] text_gen=gr.Interface.load("spaces/Omnibus/MagicPrompt-Stable-Diffusion_link",live=True, preprocess=True) proc1=gr.Interface.load(f"models/{model_1}",live=False,preprocess=True, postprocess=False) proc2=gr.Interface.load(f"models/{model_2}",live=False,preprocess=True, postprocess=False) proc3=gr.Interface.load(f"models/{model_3}",live=False,preprocess=True, postprocess=False) """ proc4=gr.Interface.load(f"models/{model_4}",live=False,preprocess=True, postprocess=False) proc5=gr.Interface.load(f"models/{model_5}",live=False,preprocess=True, postprocess=False) proc6=gr.Interface.load(f"models/{model_6}",live=False,preprocess=True, postprocess=False) proc7=gr.Interface.load(f"models/{model_7}",live=False,preprocess=True, postprocess=False) proc8=gr.Interface.load(f"models/{model_8}",live=False,preprocess=True, postprocess=False) proc9=gr.Interface.load(f"models/{model_9}",live=False,preprocess=True, postprocess=False) proc10=gr.Interface.load(f"models/{model_10}",live=False,preprocess=True, postprocess=False) proc11=gr.Interface.load(f"models/{model_11}",live=False,preprocess=True, postprocess=False) proc12=gr.Interface.load(f"models/{model_12}",live=False,preprocess=True, postprocess=False) proc13=gr.Interface.load(f"models/{model_13}",live=False,preprocess=True, postprocess=False) proc14=gr.Interface.load(f"models/{model_14}",live=False,preprocess=True, postprocess=False) proc15=gr.Interface.load(f"models/{model_15}",live=False,preprocess=True, postprocess=False) proc16=gr.Interface.load(f"models/{model_16}",live=False,preprocess=True, postprocess=False) proc17=gr.Interface.load(f"models/{model_17}",live=False,preprocess=True, postprocess=False) proc18=gr.Interface.load(f"models/{model_18}",live=False,preprocess=True, postprocess=False) proc19=gr.Interface.load(f"models/{model_19}",live=False,preprocess=True, postprocess=False) proc20=gr.Interface.load(f"models/{model_20}",live=False,preprocess=True, postprocess=False) """ #https://huggingface.co/docs/diffusers/main/en/using-diffusers/loading proc1.launch() #gr.Parallel(proc1, proc2, proc3).launch()