AlStable commited on
Commit
32e5089
1 Parent(s): 9e2b557

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -3,19 +3,19 @@ import torch
3
  import gradio as gr
4
 
5
  models=[
6
- "models/ItsJayQz/Marvel_WhatIf_Diffusion",
7
- "models/DGSpitzer/Cyberpunk-Anime-Diffusion",
8
- "models/DGSpitzer/Guan-Yu-Diffusion",
9
- "models/wavymulder/portraitplus",
10
- "models/nitrosocke/classic-anim-diffusion",
11
- "models/22h/vintedois-diffusion-v0-1",
12
- "models/dreamlike-art/dreamlike-diffusion-1.0",
13
- "models/stabilityai/stable-diffusion-2-1"
14
  ]
15
 
16
  def TextToImage(Prompt,model):
17
  model_id = model
18
- pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
19
  pipe = pipe.to("cpu")
20
  prompt = Prompt
21
  image = pipe(prompt).images[0]
 
3
  import gradio as gr
4
 
5
  models=[
6
+ "ItsJayQz/Marvel_WhatIf_Diffusion",
7
+ "DGSpitzer/Cyberpunk-Anime-Diffusion",
8
+ "DGSpitzer/Guan-Yu-Diffusion",
9
+ "wavymulder/portraitplus",
10
+ "nitrosocke/classic-anim-diffusion",
11
+ "22h/vintedois-diffusion-v0-1",
12
+ "dreamlike-art/dreamlike-diffusion-1.0",
13
+ "stabilityai/stable-diffusion-2-1"
14
  ]
15
 
16
  def TextToImage(Prompt,model):
17
  model_id = model
18
+ pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.get_default_dtype)
19
  pipe = pipe.to("cpu")
20
  prompt = Prompt
21
  image = pipe(prompt).images[0]