AlStable commited on
Commit
8620a3e
1 Parent(s): c1e0059

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -7
app.py CHANGED
@@ -4,15 +4,19 @@ import gradio as gr
4
  import accelerate
5
 
6
  models=[
7
- gr.Interface.load("Marvel","models/ItsJayQz/Marvel_WhatIf_Diffusion", "whatif style"),
8
- gr.Interface.load("Cyberpunk Anime Diffusion", "models/DGSpitzer/Cyberpunk-Anime-Diffusion", "dgs illustration style"),
9
- gr.Interface.load("Portrait plus", "models/wavymulder/portraitplus", "portrait+ style"),
10
- gr.Interface.load("classic Disney", "models/nitrosocke/classic-anim-diffusion", "classic disney style"),
11
- gr.Interface.load("vintedois", "models/22h/vintedois-diffusion-v0-1", "vintedois style"),
12
- gr.Interface.load("dreamlike", "models/dreamlike-art/dreamlike-diffusion-1.0","dreamlike style"),
13
- gr.Interface.load("SD21","models/stabilityai/stable-diffusion-2-1", "sd21 default style")
 
14
  ]
15
 
 
 
 
16
  def TextToImage(Prompt,model):
17
  model_id = model
18
  pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.get_default_dtype())
 
4
  import accelerate
5
 
6
  models=[
7
+ "ItsJayQz/Marvel_WhatIf_Diffusion",
8
+ "DGSpitzer/Cyberpunk-Anime-Diffusion",
9
+ "DGSpitzer/Guan-Yu-Diffusion",
10
+ "wavymulder/portraitplus",
11
+ "nitrosocke/classic-anim-diffusion",
12
+ "22h/vintedois-diffusion-v0-1",
13
+ "dreamlike-art/dreamlike-diffusion-1.0",
14
+ "stabilityai/stable-diffusion-2-1"
15
  ]
16
 
17
+ for i in range(len(models)):
18
+ gr.Interface.load(f"models/{models[i]}",live=True,preprocess=True)
19
+
20
  def TextToImage(Prompt,model):
21
  model_id = model
22
  pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.get_default_dtype())