raubatz commited on
Commit
f7274cd
·
1 Parent(s): 5ebd51d

Disable FA3 processor - CUDA kernel mismatch on ZeroGPU (toggle USE_FA3 to re-enable)

Browse files
Files changed (1) hide show
  1. app.py +9 -5
app.py CHANGED
@@ -37,11 +37,15 @@ pipe = QwenImageEditPlusPipeline.from_pretrained(
37
  torch_dtype=dtype,
38
  ).to(device)
39
 
40
- try:
41
- pipe.transformer.set_attn_processor(QwenDoubleStreamAttnProcessorFA3())
42
- print("Flash Attention 3 Processor set successfully.")
43
- except Exception as e:
44
- print(f"Warning: Could not set FA3 processor: {e}")
 
 
 
 
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
  {