AlStable commited on
Commit
43ab04d
·
1 Parent(s): c1e08d2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -18,23 +18,22 @@ class Model:
18
  self.prefix = prefix
19
  self.pipe_t2i = None
20
  self.pipe_i2i = None
21
-
22
  models = [
23
  Model("Marvel","models/ItsJayQz/Marvel_WhatIf_Diffusion", "whatif style"),
24
  Model("Cyberpunk Anime Diffusion", "models/DGSpitzer/Cyberpunk-Anime-Diffusion", "dgs illustration style"),
25
  Model("Guan Yu Diffusion", "models/DGSpitzer/Guan-Yu-Diffusion", "Guan-Yu style"),
26
  Model("Portrait plus", "models/wavymulder/portraitplus", "portrait+ style"),
27
  Model("classic Disney", "models/nitrosocke/classic-anim-diffusion", "classic disney style"),
 
28
  Model("SD21","models/stabilityai/stable-diffusion-2-1", "sd21 default style")
29
  ]
30
 
31
  custom_model = "models/stabilityai/stable-diffusion-2-1"
32
 
33
  def selectModel(message):
34
- logging.warning('message sent = '+message)
35
  message = message.lower()
36
  for i in range(len(models)):
37
- if message.find(models[i].prefix.lower())!=-1:
38
  c_model=models[i].path
39
  logging.warning('model selected = '+c_model)
40
  return c_model
@@ -52,6 +51,7 @@ sandbox = gr.Interface.load(
52
  api_key=API_KEY
53
  )
54
 
 
55
  logging.warning('model chosen = '+custom_model)
56
 
57
  sandbox.queue(concurrency_count=20).launch()
 
18
  self.prefix = prefix
19
  self.pipe_t2i = None
20
  self.pipe_i2i = None
 
21
  models = [
22
  Model("Marvel","models/ItsJayQz/Marvel_WhatIf_Diffusion", "whatif style"),
23
  Model("Cyberpunk Anime Diffusion", "models/DGSpitzer/Cyberpunk-Anime-Diffusion", "dgs illustration style"),
24
  Model("Guan Yu Diffusion", "models/DGSpitzer/Guan-Yu-Diffusion", "Guan-Yu style"),
25
  Model("Portrait plus", "models/wavymulder/portraitplus", "portrait+ style"),
26
  Model("classic Disney", "models/nitrosocke/classic-anim-diffusion", "classic disney style"),
27
+ Model("vintedois", "models/22h/vintedois-diffusion-v0-1", "vintedois style"),
28
  Model("SD21","models/stabilityai/stable-diffusion-2-1", "sd21 default style")
29
  ]
30
 
31
  custom_model = "models/stabilityai/stable-diffusion-2-1"
32
 
33
  def selectModel(message):
 
34
  message = message.lower()
35
  for i in range(len(models)):
36
+ if message.find(models[i].prefix)!=-1:
37
  c_model=models[i].path
38
  logging.warning('model selected = '+c_model)
39
  return c_model
 
51
  api_key=API_KEY
52
  )
53
 
54
+ logging.warning('prompt => '+inputs)
55
  logging.warning('model chosen = '+custom_model)
56
 
57
  sandbox.queue(concurrency_count=20).launch()