Spaces:
Running
on
Zero
Running
on
Zero
Remove JIT compilation (#43)
Browse files- Remove JIT compilation (d919b21c46d0ca2dd0fbff957c7a1134f711586f)
- Update requirements.txt (04fb3a2e8acc7ee67cc2616bb8f163ba4e58c5b0)
- app.py +11 -10
- requirements.txt +2 -1
app.py
CHANGED
|
@@ -6,10 +6,10 @@ import spaces
|
|
| 6 |
|
| 7 |
from PIL import Image
|
| 8 |
from diffusers import FlowMatchEulerDiscreteScheduler
|
| 9 |
-
from optimization import optimize_pipeline_
|
| 10 |
from qwenimage.pipeline_qwenimage_edit_plus import QwenImageEditPlusPipeline
|
| 11 |
from qwenimage.transformer_qwenimage import QwenImageTransformer2DModel
|
| 12 |
-
from qwenimage.qwen_fa3_processor import QwenDoubleStreamAttnProcessorFA3
|
| 13 |
|
| 14 |
import math
|
| 15 |
from huggingface_hub import hf_hub_download
|
|
@@ -44,19 +44,20 @@ pipe.load_lora_weights(
|
|
| 44 |
adapter_name="angles"
|
| 45 |
)
|
| 46 |
|
| 47 |
-
|
| 48 |
pipe.set_adapters(["angles"], adapter_weights=[1.])
|
| 49 |
pipe.fuse_lora(adapter_names=["angles"], lora_scale=1.25)
|
| 50 |
pipe.unload_lora_weights()
|
| 51 |
|
| 52 |
-
pipe.transformer
|
| 53 |
-
pipe.transformer.set_attn_processor(QwenDoubleStreamAttnProcessorFA3())
|
| 54 |
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
|
|
|
|
|
|
|
|
|
| 60 |
|
| 61 |
MAX_SEED = np.iinfo(np.int32).max
|
| 62 |
|
|
|
|
| 6 |
|
| 7 |
from PIL import Image
|
| 8 |
from diffusers import FlowMatchEulerDiscreteScheduler
|
| 9 |
+
# from optimization import optimize_pipeline_
|
| 10 |
from qwenimage.pipeline_qwenimage_edit_plus import QwenImageEditPlusPipeline
|
| 11 |
from qwenimage.transformer_qwenimage import QwenImageTransformer2DModel
|
| 12 |
+
# from qwenimage.qwen_fa3_processor import QwenDoubleStreamAttnProcessorFA3
|
| 13 |
|
| 14 |
import math
|
| 15 |
from huggingface_hub import hf_hub_download
|
|
|
|
| 44 |
adapter_name="angles"
|
| 45 |
)
|
| 46 |
|
|
|
|
| 47 |
pipe.set_adapters(["angles"], adapter_weights=[1.])
|
| 48 |
pipe.fuse_lora(adapter_names=["angles"], lora_scale=1.25)
|
| 49 |
pipe.unload_lora_weights()
|
| 50 |
|
| 51 |
+
spaces.aoti_blocks_load(pipe.transformer, "zerogpu-aoti/Qwen-Image", variant="fa3")
|
|
|
|
| 52 |
|
| 53 |
+
#pipe.transformer.__class__ = QwenImageTransformer2DModel
|
| 54 |
+
#pipe.transformer.set_attn_processor(QwenDoubleStreamAttnProcessorFA3())
|
| 55 |
+
|
| 56 |
+
#optimize_pipeline_(
|
| 57 |
+
# pipe,
|
| 58 |
+
# image=[Image.new("RGB", (1024, 1024)), Image.new("RGB", (1024, 1024))],
|
| 59 |
+
# prompt="prompt"
|
| 60 |
+
#)
|
| 61 |
|
| 62 |
MAX_SEED = np.iinfo(np.int32).max
|
| 63 |
|
requirements.txt
CHANGED
|
@@ -10,4 +10,5 @@ dashscope
|
|
| 10 |
kernels
|
| 11 |
torchvision
|
| 12 |
peft
|
| 13 |
-
torchao==0.11.0
|
|
|
|
|
|
| 10 |
kernels
|
| 11 |
torchvision
|
| 12 |
peft
|
| 13 |
+
torchao==0.11.0
|
| 14 |
+
torch==2.8
|