Spaces:
Running on Zero
Running on Zero
Disable FA3 processor - CUDA kernel mismatch on ZeroGPU (toggle USE_FA3 to re-enable)
Browse files
app.py
CHANGED
|
@@ -37,11 +37,15 @@ pipe = QwenImageEditPlusPipeline.from_pretrained(
|
|
| 37 |
torch_dtype=dtype,
|
| 38 |
).to(device)
|
| 39 |
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
|
| 46 |
EXAMPLES_CONFIG = [
|
| 47 |
{
|
|
|
|
| 37 |
torch_dtype=dtype,
|
| 38 |
).to(device)
|
| 39 |
|
| 40 |
+
USE_FA3 = False # Set True to re-enable Flash Attention 3 (needs compatible GPU kernel)
|
| 41 |
+
if USE_FA3:
|
| 42 |
+
try:
|
| 43 |
+
pipe.transformer.set_attn_processor(QwenDoubleStreamAttnProcessorFA3())
|
| 44 |
+
print("Flash Attention 3 Processor set successfully.")
|
| 45 |
+
except Exception as e:
|
| 46 |
+
print(f"Warning: Could not set FA3 processor: {e}")
|
| 47 |
+
else:
|
| 48 |
+
print("FA3 disabled — using default attention (ZeroGPU compat).")
|
| 49 |
|
| 50 |
EXAMPLES_CONFIG = [
|
| 51 |
{
|