Staticaliza commited on
Commit
1b00a63
·
verified ·
1 Parent(s): f303f09

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -2
app.py CHANGED
@@ -6,7 +6,7 @@ import torch
6
  import uuid
7
  import os
8
 
9
- from diffusers import StableDiffusionXLPipeline
10
  from transformers import pipeline
11
  from PIL import Image
12
 
@@ -43,11 +43,16 @@ repo_pixel.load_lora_weights("artificialguybr/PixelArtRedmond", adapter_name="ba
43
  repo_pixel.load_lora_weights("nerijs/pixel-art-xl", adapter_name="base2")
44
  repo_pixel.set_adapters(["base", "base2"], adapter_weights=[1, 1])
45
 
 
 
 
 
46
  repo_customs = {
47
  "Default": repo_default,
48
  "Realistic": StableDiffusionXLPipeline.from_pretrained("ehristoforu/Visionix-alpha", torch_dtype=torch.float16, use_safetensors=True, add_watermarker=False),
49
  "Anime": StableDiffusionXLPipeline.from_pretrained("cagliostrolab/animagine-xl-3.1", torch_dtype=torch.float16, use_safetensors=True, add_watermarker=False),
50
  "Pixel": repo_pixel,
 
51
  }
52
 
53
  # Functions
@@ -84,8 +89,11 @@ def generate(input=DEFAULT_INPUT, filter_input="", negative_input=DEFAULT_NEGATI
84
  elif model == "Pixel":
85
  steps_set = 15
86
  guidance_set = 1.5
 
 
 
87
  else:
88
- steps_set = 20
89
  guidance_set = 7
90
 
91
  if not steps:
 
6
  import uuid
7
  import os
8
 
9
+ from diffusers import StableDiffusionXLPipeline, StableDiffusion3Pipeline
10
  from transformers import pipeline
11
  from PIL import Image
12
 
 
43
  repo_pixel.load_lora_weights("nerijs/pixel-art-xl", adapter_name="base2")
44
  repo_pixel.set_adapters(["base", "base2"], adapter_weights=[1, 1])
45
 
46
+ repo_large = StableDiffusion3Pipeline.from_pretrained("stabilityai/stable-diffusion-3-medium-diffusers", torch_dtype=torch.float16, use_safetensors=True, add_watermarker=False)
47
+ repo_large.load_lora_weights("ehristoforu/dalle-3-xl-v2", adapter_name="base")
48
+ repo_large.set_adapters(["base"], adapter_weights=[0.7])
49
+
50
  repo_customs = {
51
  "Default": repo_default,
52
  "Realistic": StableDiffusionXLPipeline.from_pretrained("ehristoforu/Visionix-alpha", torch_dtype=torch.float16, use_safetensors=True, add_watermarker=False),
53
  "Anime": StableDiffusionXLPipeline.from_pretrained("cagliostrolab/animagine-xl-3.1", torch_dtype=torch.float16, use_safetensors=True, add_watermarker=False),
54
  "Pixel": repo_pixel,
55
+ "Large": repo_large,
56
  }
57
 
58
  # Functions
 
89
  elif model == "Pixel":
90
  steps_set = 15
91
  guidance_set = 1.5
92
+ elif model == "Large":
93
+ steps_set = 25
94
+ guidance_set = 5
95
  else:
96
+ steps_set = 25
97
  guidance_set = 7
98
 
99
  if not steps: