lachine commited on
Commit
165626a
1 Parent(s): 06afc8b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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('cuda', 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}
 
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}