AlexWortega commited on
Commit
8be1a0a
1 Parent(s): 8afd6e1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -4,14 +4,13 @@ import torch
4
  from torch import autocast
5
  from kandinsky2 import get_kandinsky2
6
 
7
- #model_id = "hakurei/waifu-diffusion"
8
  model = get_kandinsky2('cuda', task_type='text2img')
9
 
10
- #torch.backends.cudnn.benchmark = True
11
 
12
 
13
  def infer(prompt):
14
- images = model.generate_text2img('A teddy bear на красной площади', batch_size=4, h=512, w=512, num_steps=75, denoised_type='dynamic_threshold', dynamic_threshold_v=99.5, sampler='ddim_sampler', ddim_eta=0.05, guidance_scale=10)
15
  return images
16
 
17
  css = """
 
4
  from torch import autocast
5
  from kandinsky2 import get_kandinsky2
6
 
 
7
  model = get_kandinsky2('cuda', task_type='text2img')
8
 
9
+
10
 
11
 
12
  def infer(prompt):
13
+ images = model.generate_text2img(prompt, batch_size=4, h=512, w=512, num_steps=75, denoised_type='dynamic_threshold', dynamic_threshold_v=99.5, sampler='ddim_sampler', ddim_eta=0.05, guidance_scale=10)
14
  return images
15
 
16
  css = """