ai-forever commited on
Commit
c1ce68c
β€’
1 Parent(s): 83244a3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -5
app.py CHANGED
@@ -11,13 +11,27 @@ from kandinsky2 import get_kandinsky2
11
  model = get_kandinsky2('cuda', task_type='text2img', model_version='2.1', use_flash_attention=False)
12
 
13
 
14
-
 
 
 
 
 
 
 
 
 
15
  def infer(prompt, negative):
16
- images = model.generate_text2img(prompt, negative_prior_prompt=negative,negative_decoder_prompt=negative, num_steps=100,
17
- batch_size=1, guidance_scale=4,
 
 
 
 
18
  h=768, w=768,
19
- sampler='p_sampler', prior_cf_scale=4,
20
- prior_steps="5",)
 
21
  return images
22
 
23
  css = """
 
11
  model = get_kandinsky2('cuda', task_type='text2img', model_version='2.1', use_flash_attention=False)
12
 
13
 
14
+ """
15
+ num_steps=50,
16
+ batch_size=4,
17
+ guidance_scale=7,
18
+ h=768,
19
+ w=768,
20
+ sampler='ddim_sampler',
21
+ prior_cf_scale=1,
22
+ prior_steps='25',
23
+ """
24
  def infer(prompt, negative):
25
+ images = model.generate_text2img(prompt,
26
+ negative_prior_prompt=negative,
27
+ negative_decoder_prompt=negative,
28
+ num_steps=50,
29
+ batch_size=1,
30
+ guidance_scale=4,
31
  h=768, w=768,
32
+ sampler='ddim_sampler',
33
+ prior_cf_scale=1,
34
+ prior_steps="25",)
35
  return images
36
 
37
  css = """