Spaces:
Running
on
Zero
Running
on
Zero
alex
commited on
Commit
·
3a03985
1
Parent(s):
6ffc50e
internal
Browse files- app.py +17 -7
- ovi/modules/attention.py +1 -0
app.py
CHANGED
|
@@ -1,11 +1,4 @@
|
|
| 1 |
import spaces
|
| 2 |
-
import gradio as gr
|
| 3 |
-
import argparse
|
| 4 |
-
from ovi.ovi_fusion_engine import OviFusionEngine, DEFAULT_CONFIG
|
| 5 |
-
from diffusers import FluxPipeline
|
| 6 |
-
import tempfile
|
| 7 |
-
from ovi.utils.io_utils import save_video
|
| 8 |
-
from ovi.utils.processing_utils import clean_text, scale_hw_to_area_divisible
|
| 9 |
from huggingface_hub import snapshot_download, hf_hub_download
|
| 10 |
import os
|
| 11 |
import subprocess
|
|
@@ -46,6 +39,23 @@ import torch
|
|
| 46 |
print(f"Torch version: {torch.__version__}")
|
| 47 |
print(f"FlashAttention available: {flash_attention_installed}")
|
| 48 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
# ----------------------------
|
| 50 |
# Parse CLI Args
|
| 51 |
# ----------------------------
|
|
|
|
| 1 |
import spaces
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
from huggingface_hub import snapshot_download, hf_hub_download
|
| 3 |
import os
|
| 4 |
import subprocess
|
|
|
|
| 39 |
print(f"Torch version: {torch.__version__}")
|
| 40 |
print(f"FlashAttention available: {flash_attention_installed}")
|
| 41 |
|
| 42 |
+
|
| 43 |
+
try:
|
| 44 |
+
import flash_attn_interface
|
| 45 |
+
FLASH_ATTN_3_AVAILABLE = True
|
| 46 |
+
print(f'FLASH_ATTN_3_AVAILABLE-innit:{FLASH_ATTN_3_AVAILABLE}')
|
| 47 |
+
except ModuleNotFoundError:
|
| 48 |
+
print(f'faield FLASH_ATTN_3_AVAILABLE-innit:{FLASH_ATTN_3_AVAILABLE}')
|
| 49 |
+
FLASH_ATTN_3_AVAILABLE = False
|
| 50 |
+
|
| 51 |
+
import gradio as gr
|
| 52 |
+
import argparse
|
| 53 |
+
from ovi.ovi_fusion_engine import OviFusionEngine, DEFAULT_CONFIG
|
| 54 |
+
from diffusers import FluxPipeline
|
| 55 |
+
import tempfile
|
| 56 |
+
from ovi.utils.io_utils import save_video
|
| 57 |
+
from ovi.utils.processing_utils import clean_text, scale_hw_to_area_divisible
|
| 58 |
+
|
| 59 |
# ----------------------------
|
| 60 |
# Parse CLI Args
|
| 61 |
# ----------------------------
|
ovi/modules/attention.py
CHANGED
|
@@ -6,6 +6,7 @@ try:
|
|
| 6 |
FLASH_ATTN_3_AVAILABLE = True
|
| 7 |
print(f'FLASH_ATTN_3_AVAILABLE:{FLASH_ATTN_3_AVAILABLE}')
|
| 8 |
except ModuleNotFoundError:
|
|
|
|
| 9 |
FLASH_ATTN_3_AVAILABLE = False
|
| 10 |
|
| 11 |
try:
|
|
|
|
| 6 |
FLASH_ATTN_3_AVAILABLE = True
|
| 7 |
print(f'FLASH_ATTN_3_AVAILABLE:{FLASH_ATTN_3_AVAILABLE}')
|
| 8 |
except ModuleNotFoundError:
|
| 9 |
+
print(f'faield FLASH_ATTN_3_AVAILABLE:{FLASH_ATTN_3_AVAILABLE}')
|
| 10 |
FLASH_ATTN_3_AVAILABLE = False
|
| 11 |
|
| 12 |
try:
|