Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ from torch import autocast
|
|
4 |
from kandinsky2 import get_kandinsky2
|
5 |
|
6 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
7 |
-
model = get_kandinsky2(
|
8 |
|
9 |
def generate_text(prompt, quality="High (Default)"):
|
10 |
length_dict = {"Low": 50, "High (Default)": 100, "Ultra": 150}
|
|
|
4 |
from kandinsky2 import get_kandinsky2
|
5 |
|
6 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
7 |
+
model = get_kandinsky2(device.type, task_type='text2img', cache_dir='/tmp/kandinsky2', model_version='2.1', use_flash_attention=False)
|
8 |
|
9 |
def generate_text(prompt, quality="High (Default)"):
|
10 |
length_dict = {"Low": 50, "High (Default)": 100, "Ultra": 150}
|