Spaces:
Running on Zero
Running on Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -66,17 +66,6 @@ from image_gen_aux import UpscaleWithModel
|
|
| 66 |
from diffusers.models.attention_processor import AttnProcessor2_0
|
| 67 |
from kernels import get_kernel, has_kernel
|
| 68 |
|
| 69 |
-
# 1. Torch + CUDA info
|
| 70 |
-
import torch
|
| 71 |
-
print('Torch:', torch.__version__)
|
| 72 |
-
print('CUDA:', torch.version.cuda if torch.cuda.is_available() else 'None')
|
| 73 |
-
print('Device:', torch.cuda.get_device_name(0) if torch.cuda.is_available() else 'CPU')
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
# 2. Check available kernels
|
| 77 |
-
kernels versions kernels-community/flash-attn3
|
| 78 |
-
kernels versions kernels-community/vllm-flash-attn3
|
| 79 |
-
|
| 80 |
|
| 81 |
class FlashAttentionProcessor(AttnProcessor2_0):
|
| 82 |
def __call__(
|
|
@@ -168,7 +157,7 @@ def load_model():
|
|
| 168 |
|
| 169 |
pipe, upscaler_2 = load_model()
|
| 170 |
|
| 171 |
-
fa_processor = FlashAttentionProcessor()
|
| 172 |
|
| 173 |
#for name, module in pipe.transformer.named_modules():
|
| 174 |
# if isinstance(module, AttnProcessor2_0):
|
|
|
|
| 66 |
from diffusers.models.attention_processor import AttnProcessor2_0
|
| 67 |
from kernels import get_kernel, has_kernel
|
| 68 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 69 |
|
| 70 |
class FlashAttentionProcessor(AttnProcessor2_0):
|
| 71 |
def __call__(
|
|
|
|
| 157 |
|
| 158 |
pipe, upscaler_2 = load_model()
|
| 159 |
|
| 160 |
+
#fa_processor = FlashAttentionProcessor()
|
| 161 |
|
| 162 |
#for name, module in pipe.transformer.named_modules():
|
| 163 |
# if isinstance(module, AttnProcessor2_0):
|