Spaces:
Running on Zero
Running on Zero
Elea Zhong commited on
Commit ·
077eede
1
Parent(s): 77afe44
update app
Browse files
app.py
CHANGED
|
@@ -6,27 +6,14 @@ import tempfile
|
|
| 6 |
import sys
|
| 7 |
|
| 8 |
import numpy as np
|
| 9 |
-
from spaces.zero.torch.aoti import ZeroGPUCompiledModel, ZeroGPUWeights
|
| 10 |
import torch
|
| 11 |
from PIL import Image
|
| 12 |
import gradio as gr
|
| 13 |
-
from gradio_client import Client, handle_file
|
| 14 |
import spaces
|
| 15 |
-
from diffusers import FlowMatchEulerDiscreteScheduler
|
| 16 |
-
from huggingface_hub import hf_hub_download
|
| 17 |
-
from safetensors.torch import load_file
|
| 18 |
-
from torchao.quantization import quantize_
|
| 19 |
-
from torchao.quantization import Int8WeightOnlyConfig
|
| 20 |
|
| 21 |
from qwenimage.debug import ctimed, ftimed
|
| 22 |
-
from qwenimage.experiments.experiments_qwen import
|
| 23 |
-
from qwenimage.optimization import optimize_pipeline_
|
| 24 |
from qwenimage.prompt import build_camera_prompt
|
| 25 |
-
from qwenimage.models.pipeline_qwenimage_edit_plus import QwenImageEditPlusPipeline
|
| 26 |
-
from qwenimage.models.transformer_qwenimage import QwenImageTransformer2DModel
|
| 27 |
-
from qwenimage.models.qwen_fa3_processor import QwenDoubleStreamAttnProcessorFA3
|
| 28 |
-
|
| 29 |
-
sys.setrecursionlimit(10_000)
|
| 30 |
|
| 31 |
# --- Model Loading ---
|
| 32 |
dtype = torch.bfloat16
|
|
|
|
| 6 |
import sys
|
| 7 |
|
| 8 |
import numpy as np
|
|
|
|
| 9 |
import torch
|
| 10 |
from PIL import Image
|
| 11 |
import gradio as gr
|
|
|
|
| 12 |
import spaces
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
|
| 14 |
from qwenimage.debug import ctimed, ftimed
|
| 15 |
+
from qwenimage.experiments.experiments_qwen import ExperimentRegistry
|
|
|
|
| 16 |
from qwenimage.prompt import build_camera_prompt
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
# --- Model Loading ---
|
| 19 |
dtype = torch.bfloat16
|