Spaces:
Running
on
Zero
Running
on
Zero
Alexander Bagus
commited on
Commit
·
e39d4a6
1
Parent(s):
8752935
22
Browse files
app.py
CHANGED
|
@@ -20,6 +20,7 @@ MAX_IMAGE_SIZE = 1280
|
|
| 20 |
MODEL_LOCAL = "models/Z-Image-Turbo/"
|
| 21 |
# curl -L -o Z-Image-Turbo-Fun-Controlnet-Union.safetensors https://huggingface.co/alibaba-pai/Z-Image-Turbo-Fun-Controlnet-Union/resolve/main/Z-Image-Turbo-Fun-Controlnet-Union.safetensors
|
| 22 |
TRANSFORMER_LOCAL = "models/Z-Image-Turbo-Fun-Controlnet-Union.safetensors"
|
|
|
|
| 23 |
|
| 24 |
weight_dtype = torch.bfloat16
|
| 25 |
|
|
@@ -97,6 +98,10 @@ def inference(
|
|
| 97 |
num_inference_steps=8,
|
| 98 |
progress=gr.Progress(track_tqdm=True),
|
| 99 |
):
|
|
|
|
|
|
|
|
|
|
|
|
|
| 100 |
# process image
|
| 101 |
print("DEBUG: process image")
|
| 102 |
if input_image is None:
|
|
|
|
| 20 |
MODEL_LOCAL = "models/Z-Image-Turbo/"
|
| 21 |
# curl -L -o Z-Image-Turbo-Fun-Controlnet-Union.safetensors https://huggingface.co/alibaba-pai/Z-Image-Turbo-Fun-Controlnet-Union/resolve/main/Z-Image-Turbo-Fun-Controlnet-Union.safetensors
|
| 22 |
TRANSFORMER_LOCAL = "models/Z-Image-Turbo-Fun-Controlnet-Union.safetensors"
|
| 23 |
+
INFERENCE_CNT = 0
|
| 24 |
|
| 25 |
weight_dtype = torch.bfloat16
|
| 26 |
|
|
|
|
| 98 |
num_inference_steps=8,
|
| 99 |
progress=gr.Progress(track_tqdm=True),
|
| 100 |
):
|
| 101 |
+
INFERENCE_CNT = INFERENCE_CNT + 1
|
| 102 |
+
print("INFERENCE_CNT: " + INFERENCE_CNT)
|
| 103 |
+
|
| 104 |
+
|
| 105 |
# process image
|
| 106 |
print("DEBUG: process image")
|
| 107 |
if input_image is None:
|