Spaces:
Runtime error
Runtime error
ai-forever
commited on
Commit
β’
c1ce68c
1
Parent(s):
83244a3
Update app.py
Browse files
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,
|
17 |
-
|
|
|
|
|
|
|
|
|
18 |
h=768, w=768,
|
19 |
-
sampler='
|
20 |
-
|
|
|
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 = """
|