Kohaku-Blueleaf commited on
Commit
a3ce076
1 Parent(s): 7fdb61e

updates some detail

Browse files
Files changed (2) hide show
  1. app.py +5 -5
  2. diff.py +3 -1
app.py CHANGED
@@ -53,10 +53,10 @@ DEFAULT_FORMAT = """<|special|>, <|characters|>, <|copyrights|>,
53
  <|quality|>, <|meta|>, <|rating|>
54
  """.strip()
55
  DEFAULT_TAGS = """
56
- 1girl,
57
- ningen mame, ciloranko,
58
- solo, dragon girl,
59
- masterpiece, absurdres, safe, newest
60
  """.strip()
61
  DEFAULT_NL = """
62
  An illustration of a girl
@@ -228,7 +228,7 @@ TITPOP
228
  target_length = gr.Dropdown(
229
  label="Target Length",
230
  choices=["very_short", "short", "long", "very_long"],
231
- value="short",
232
  )
233
  temp = gr.Slider(
234
  label="Temp",
 
53
  <|quality|>, <|meta|>, <|rating|>
54
  """.strip()
55
  DEFAULT_TAGS = """
56
+ 1girl, king halo (umamusume), umamusume,
57
+ ningen mame, ciloranko, ogipote, misu kasumi,
58
+ solo, leaning forward, sky,
59
+ masterpiece, absurdres, sensitive, newest
60
  """.strip()
61
  DEFAULT_NL = """
62
  An illustration of a girl
 
228
  target_length = gr.Dropdown(
229
  label="Target Length",
230
  choices=["very_short", "short", "long", "very_long"],
231
+ value="long",
232
  )
233
  temp = gr.Slider(
234
  label="Temp",
diff.py CHANGED
@@ -1,7 +1,7 @@
1
  from functools import partial
2
 
3
  import torch
4
- from diffusers import StableDiffusionXLKDiffusionPipeline
5
  from k_diffusion.sampling import get_sigmas_polyexponential
6
  from k_diffusion.sampling import sample_dpmpp_2m_sde
7
 
@@ -37,6 +37,8 @@ def load_model(model_id="KBlueLeaf/Kohaku-XL-Zeta", device="cuda"):
37
  pipe = StableDiffusionXLKDiffusionPipeline.from_pretrained(
38
  model_id, torch_dtype=torch.float16
39
  ).to(device)
 
 
40
  pipe.scheduler.set_timesteps = partial(
41
  set_timesteps_polyexponential, pipe.scheduler, pipe.scheduler.sigmas
42
  )
 
1
  from functools import partial
2
 
3
  import torch
4
+ from diffusers import StableDiffusionXLKDiffusionPipeline, UNet2DConditionModel
5
  from k_diffusion.sampling import get_sigmas_polyexponential
6
  from k_diffusion.sampling import sample_dpmpp_2m_sde
7
 
 
37
  pipe = StableDiffusionXLKDiffusionPipeline.from_pretrained(
38
  model_id, torch_dtype=torch.float16
39
  ).to(device)
40
+ unet: UNet2DConditionModel = pipe.k_diffusion_model.inner_model.model
41
+ unet.enable_xformers_memory_efficient_attention()
42
  pipe.scheduler.set_timesteps = partial(
43
  set_timesteps_polyexponential, pipe.scheduler, pipe.scheduler.sigmas
44
  )