File size: 2,598 Bytes
88c6e7a
 
 
 
535432c
88c6e7a
 
 
 
 
1c3e569
 
88c6e7a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f323ead
 
768fc84
31c8753
23436bf
88c6e7a
31c8753
88c6e7a
 
f323ead
f66495f
1c3e569
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
from diffusers import AutoPipelineForText2Image
import torch
import gradio as gr
from PIL import Image
import os, random
from diffusers.utils import load_image
from accelerate import Accelerator

accelerator = Accelerator()
models =[
    "prompthero/midjourney-v4-diffusion",
    "nitrosocke/classic-anim-diffusion",
    "stablediffusionapi/disney-pixal-cartoon",
    "stablediffusionapi/edge-of-realism",
    "sd-dreambooth-library/original-character-cyclps",
    "AIArtsChannel/steampunk-diffusion",
    "nitrosocke/mo-di-diffusion",
    "MirageML/fantasy-scene",
    "wavymulder/lomo-diffusion",
    "sd-dreambooth-library/fashion",
    "DucHaiten/DucHaitenDreamWorld",
    "VegaKH/Ultraskin",
    "kandinsky-community/kandinsky-2-1",
    "plasmo/woolitize-768sd1-5",
    "plasmo/food-crit",
    "johnslegers/epic-diffusion-v1.1",
    "robotjung/SemiRealMix",
    "prompthero/linkedin-diffusion",
    "RayHell/popupBook-diffusion",
    "MirageML/lowpoly-world",
    "warp-ai/wuerstchen",
    "deadman44/SD_Photoreal_Merged_Models",
    "johnslegers/epic-diffusion",
    "wavymulder/modelshoot",
    "Fictiverse/Stable_Diffusion_VoxelArt_Model",
    "nousr/robo-diffusion-2-base",
    "darkstorm2150/Protogen_v2.2_Official_Release",
    "hassanblend/HassanBlend1.5.1.2",
    "hassanblend/hassanblend1.4",
    "nitrosocke/redshift-diffusion",
    "prompthero/openjourney-v2",
    "nitrosocke/Arcane-Diffusion",
    "Lykon/DreamShaper",
    "wavymulder/Analog-Diffusion",
    "dreamlike-art/dreamlike-diffusion-1.0",
    "dreamlike-art/dreamlike-photoreal-2.0",
    "digiplay/RealismEngine_v1",
    "digiplay/AIGEN_v1.4_diffusers",
    "stablediffusionapi/dreamshaper-v6",
    "axolotron/ice-cream-animals",
    "TheLastBen/froggy-style-v21-768",
    "FloydianSound/Nixeu_Diffusion_v1-5",
    "digiplay/PotoPhotoRealism_v1",
]

###bor = len(models)
###current = random.randint(1, bor)

def plex(modil,prompt,neg_prompt):
    pipe = accelerator.prepare(AutoPipelineForText2Image.from_pretrained(""+modil+"", torch_dtype=torch.float32))
    pipe = accelerator.prepare(pipe.to("cpu"))
    image = pipe(prompt=prompt, negative_prompt=neg_prompt,num_inference_steps=10).images[0]
    return image

iface = gr.Interface(fn=plex,inputs=[gr.Dropdown(choices=models, type="value", value=models[0]), gr.Textbox(label="Prompt"), gr.Textbox(label="negative_prompt", value="low quality, bad quality")],outputs=gr.Image(label="Generated Output Image"), title="AutoPipelineForText2Image_SD_Multi",description="AutoPipelineForText2Image_SD_Multi")
iface.queue(max_size=1,api_open=False)
iface.launch(max_threads=1)