Staticaliza commited on
Commit
f531783
·
verified ·
1 Parent(s): cb5ecc3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -40,6 +40,7 @@ repo_default.set_adapters(["base"], adapter_weights=[0.7])
40
 
41
  repo_customs = {
42
  "Default": repo_default,
 
43
  "Anime": StableDiffusionXLPipeline.from_pretrained("cagliostrolab/animagine-xl-3.1", vae=vae, controlnet=controlnet, torch_dtype=torch.float16, use_safetensors=True, add_watermarker=False),
44
  }
45
 
@@ -66,7 +67,10 @@ def generate(input=DEFAULT_INPUT, filter_input="", negative_input=DEFAULT_NEGATI
66
 
67
  print(input, filter_input, negative_input, model, height, width, steps, guidance, number, seed)
68
 
69
- if model == "Anime":
 
 
 
70
  steps = (not steps or steps < 0 and 16) or steps
71
  guidance = (not guidance or guidance < 0 and 7) or guidance
72
  else:
 
40
 
41
  repo_customs = {
42
  "Default": repo_default,
43
+ "Realistic": StableDiffusionXLPipeline.from_pretrained("stablediffusionapi/NightVision_XL", vae=vae, controlnet=controlnet, torch_dtype=torch.float16, use_safetensors=True, add_watermarker=False),
44
  "Anime": StableDiffusionXLPipeline.from_pretrained("cagliostrolab/animagine-xl-3.1", vae=vae, controlnet=controlnet, torch_dtype=torch.float16, use_safetensors=True, add_watermarker=False),
45
  }
46
 
 
67
 
68
  print(input, filter_input, negative_input, model, height, width, steps, guidance, number, seed)
69
 
70
+ if model == "Realistic":
71
+ steps = (not steps or steps < 0 and 30) or steps
72
+ guidance = (not guidance or guidance < 0 and 7) or guidance
73
+ elif model == "Anime":
74
  steps = (not steps or steps < 0 and 16) or steps
75
  guidance = (not guidance or guidance < 0 and 7) or guidance
76
  else: