AlekseyCalvin commited on
Commit
a4f6601
·
verified ·
1 Parent(s): b0a4bab

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -56,6 +56,9 @@ pipe.tokenizer_max_length = 248
56
  pipe.text_encoder.dtype = torch.bfloat16
57
  #pipe.text_encoder_2 = t5.text_model
58
 
 
 
 
59
  MAX_SEED = 2**32-1
60
 
61
  class calculateDuration:
 
56
  pipe.text_encoder.dtype = torch.bfloat16
57
  #pipe.text_encoder_2 = t5.text_model
58
 
59
+ pipe.transformer.enable_layerwise_casting(
60
+ storage_dtype=torch.float8_e4m3fn, compute_dtype=torch.bfloat16
61
+ )
62
  MAX_SEED = 2**32-1
63
 
64
  class calculateDuration: