Spaces:
Running
on
Zero
Running
on
Zero
Alexander Bagus
commited on
Commit
·
9f51691
1
Parent(s):
4c72f53
22
Browse files
app.py
CHANGED
|
@@ -11,6 +11,7 @@ from videox_fun.models import ZImageControlTransformer2DModel
|
|
| 11 |
from transformers import AutoTokenizer, Qwen3ForCausalLM
|
| 12 |
from diffusers import AutoencoderKL
|
| 13 |
from utils.image_utils import get_image_latent, scale_image
|
|
|
|
| 14 |
# from videox_fun.utils.utils import get_image_latent
|
| 15 |
|
| 16 |
|
|
@@ -137,7 +138,7 @@ with open('static/data.json', 'r') as file:
|
|
| 137 |
data = json.load(file)
|
| 138 |
examples = data['examples']
|
| 139 |
|
| 140 |
-
with gr.Blocks(
|
| 141 |
with gr.Column(elem_id="col-container"):
|
| 142 |
with gr.Column():
|
| 143 |
gr.HTML(read_file("static/header.html"))
|
|
@@ -159,7 +160,10 @@ with gr.Blocks(css=css) as demo:
|
|
| 159 |
|
| 160 |
run_button = gr.Button("Run", variant="primary")
|
| 161 |
with gr.Column():
|
| 162 |
-
output_image = gr.Image(label="
|
|
|
|
|
|
|
|
|
|
| 163 |
|
| 164 |
with gr.Accordion("Advanced Settings", open=False):
|
| 165 |
seed = gr.Slider(
|
|
@@ -226,4 +230,4 @@ with gr.Blocks(css=css) as demo:
|
|
| 226 |
)
|
| 227 |
|
| 228 |
if __name__ == "__main__":
|
| 229 |
-
demo.launch(mcp_server=True)
|
|
|
|
| 11 |
from transformers import AutoTokenizer, Qwen3ForCausalLM
|
| 12 |
from diffusers import AutoencoderKL
|
| 13 |
from utils.image_utils import get_image_latent, scale_image
|
| 14 |
+
from utils.prompt_utils import polish_prompt
|
| 15 |
# from videox_fun.utils.utils import get_image_latent
|
| 16 |
|
| 17 |
|
|
|
|
| 138 |
data = json.load(file)
|
| 139 |
examples = data['examples']
|
| 140 |
|
| 141 |
+
with gr.Blocks() as demo:
|
| 142 |
with gr.Column(elem_id="col-container"):
|
| 143 |
with gr.Column():
|
| 144 |
gr.HTML(read_file("static/header.html"))
|
|
|
|
| 160 |
|
| 161 |
run_button = gr.Button("Run", variant="primary")
|
| 162 |
with gr.Column():
|
| 163 |
+
output_image = gr.Image(label="Generated image", show_label=False)
|
| 164 |
+
polished_prompt = gr.Textbox(label="Polished prompt", interactive=False)
|
| 165 |
+
with gr.Accordion("Control image", open=False):
|
| 166 |
+
control_image = gr.Image(label="Control image", show_label=False)
|
| 167 |
|
| 168 |
with gr.Accordion("Advanced Settings", open=False):
|
| 169 |
seed = gr.Slider(
|
|
|
|
| 230 |
)
|
| 231 |
|
| 232 |
if __name__ == "__main__":
|
| 233 |
+
demo.launch(mcp_server=True, css=css)
|