ford442 commited on
Commit
32b1cbb
·
verified ·
1 Parent(s): e987fc4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -2
app.py CHANGED
@@ -407,9 +407,9 @@ def generate_30(
407
  use_resolution_binning: bool = True,
408
  progress=gr.Progress(track_tqdm=True)
409
  ):
410
- if Sage==True:
411
  F.scaled_dot_product_attention = sageattn
412
- if Sage==False:
413
  F.scaled_dot_product_attention = F.scaled_dot_product_attention
414
  seed = random.randint(0, MAX_SEED)
415
  generator = torch.Generator(device='cuda').manual_seed(seed)
@@ -461,6 +461,10 @@ def generate_60(
461
  use_resolution_binning: bool = True,
462
  progress=gr.Progress(track_tqdm=True)
463
  ):
 
 
 
 
464
  seed = random.randint(0, MAX_SEED)
465
  generator = torch.Generator(device='cuda').manual_seed(seed)
466
  options = {
@@ -506,6 +510,10 @@ def generate_90(
506
  use_resolution_binning: bool = True,
507
  progress=gr.Progress(track_tqdm=True)
508
  ):
 
 
 
 
509
  seed = random.randint(0, MAX_SEED)
510
  generator = torch.Generator(device='cuda').manual_seed(seed)
511
  options = {
 
407
  use_resolution_binning: bool = True,
408
  progress=gr.Progress(track_tqdm=True)
409
  ):
410
+ if sageattnage==True:
411
  F.scaled_dot_product_attention = sageattn
412
+ if sage==False:
413
  F.scaled_dot_product_attention = F.scaled_dot_product_attention
414
  seed = random.randint(0, MAX_SEED)
415
  generator = torch.Generator(device='cuda').manual_seed(seed)
 
461
  use_resolution_binning: bool = True,
462
  progress=gr.Progress(track_tqdm=True)
463
  ):
464
+ if sageattnage==True:
465
+ F.scaled_dot_product_attention = sageattn
466
+ if sage==False:
467
+ F.scaled_dot_product_attention = F.scaled_dot_product_attention
468
  seed = random.randint(0, MAX_SEED)
469
  generator = torch.Generator(device='cuda').manual_seed(seed)
470
  options = {
 
510
  use_resolution_binning: bool = True,
511
  progress=gr.Progress(track_tqdm=True)
512
  ):
513
+ if sageattnage==True:
514
+ F.scaled_dot_product_attention = sageattn
515
+ if sage==False:
516
+ F.scaled_dot_product_attention = F.scaled_dot_product_attention
517
  seed = random.randint(0, MAX_SEED)
518
  generator = torch.Generator(device='cuda').manual_seed(seed)
519
  options = {