Update app.py
Browse files
app.py
CHANGED
|
@@ -204,7 +204,6 @@ def generate_viz_wrapper_t2i(prompt_text, steps, guidance_scale, mask_schedule="
|
|
| 204 |
def generate_viz_wrapper_lm(prompt_text, steps, gen_length, block_length, temperature,
|
| 205 |
cfg_scale, remasking_strategy, thinking_mode_lm=False):
|
| 206 |
global MODEL, TOKENIZER, MASK_ID, DEVICE
|
| 207 |
-
print(f"thinking_mode_lm: {thinking_mode_lm}")
|
| 208 |
if MODEL is None or TOKENIZER is None or MASK_ID is None:
|
| 209 |
yield [("Error: Model not loaded. Please load the model first.", "ERROR")], "Model not loaded."
|
| 210 |
return
|
|
@@ -575,7 +574,6 @@ footer{display:none !important}
|
|
| 575 |
|
| 576 |
# thinking_mode_t2i = gr.State(False)
|
| 577 |
def toggle_thinking_mode_lm(current_thinking_mode):
|
| 578 |
-
# print(f"current_thinking_mode: {current_thinking_mode}")
|
| 579 |
new_state = not current_thinking_mode
|
| 580 |
new_label = "Thinking Mode β
" if new_state else "Thinking Mode β"
|
| 581 |
return new_state, gr.update(value=new_label)
|
|
@@ -599,10 +597,23 @@ with gr.Blocks(css=css_styles, theme=theme) as demo:
|
|
| 599 |
# with gr.Blocks() as demo:
|
| 600 |
thinking_mode_lm = gr.State(False)
|
| 601 |
thinking_mode_mmu = gr.State(False)
|
| 602 |
-
gr.Markdown("<h1 style='text-align: center; margin-bottom: 20px;'>MMaDA: Multimodal Large Diffusion Language Models</h1>")
|
| 603 |
-
gr.Markdown("MMaDA is a novel class of multimodal diffusion foundation models designed to achieve superior performance across diverse domains such as textual reasoning, multimodal understanding, and text-to-image generation")
|
| 604 |
-
gr.Markdown("Github: [Gen-Verse/MMaDA](https://github.com/Gen-Verse/MMaDA)")
|
| 605 |
-
gr.Markdown("Paper: [MMaDA: Multimodal Large Diffusion Language Models]()")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 606 |
with gr.Row():
|
| 607 |
model_select_radio = gr.Radio(
|
| 608 |
label="Select Text Generation Model",
|
|
|
|
| 204 |
def generate_viz_wrapper_lm(prompt_text, steps, gen_length, block_length, temperature,
|
| 205 |
cfg_scale, remasking_strategy, thinking_mode_lm=False):
|
| 206 |
global MODEL, TOKENIZER, MASK_ID, DEVICE
|
|
|
|
| 207 |
if MODEL is None or TOKENIZER is None or MASK_ID is None:
|
| 208 |
yield [("Error: Model not loaded. Please load the model first.", "ERROR")], "Model not loaded."
|
| 209 |
return
|
|
|
|
| 574 |
|
| 575 |
# thinking_mode_t2i = gr.State(False)
|
| 576 |
def toggle_thinking_mode_lm(current_thinking_mode):
|
|
|
|
| 577 |
new_state = not current_thinking_mode
|
| 578 |
new_label = "Thinking Mode β
" if new_state else "Thinking Mode β"
|
| 579 |
return new_state, gr.update(value=new_label)
|
|
|
|
| 597 |
# with gr.Blocks() as demo:
|
| 598 |
thinking_mode_lm = gr.State(False)
|
| 599 |
thinking_mode_mmu = gr.State(False)
|
| 600 |
+
# gr.Markdown("<h1 style='text-align: center; margin-bottom: 20px;'>MMaDA: Multimodal Large Diffusion Language Models</h1>")
|
| 601 |
+
# gr.Markdown("MMaDA is a novel class of multimodal diffusion foundation models designed to achieve superior performance across diverse domains such as textual reasoning, multimodal understanding, and text-to-image generation")
|
| 602 |
+
# gr.Markdown("Github: [Gen-Verse/MMaDA](https://github.com/Gen-Verse/MMaDA)")
|
| 603 |
+
# gr.Markdown("Paper: [MMaDA: Multimodal Large Diffusion Language Models]()")
|
| 604 |
+
gr.HTML("""
|
| 605 |
+
<div align="center" style="margin-bottom: 20px;">
|
| 606 |
+
<img src="figs/title.png" width="180"/>
|
| 607 |
+
<p style="font-size: 16px; max-width: 600px; margin: 5px auto;">
|
| 608 |
+
MMaDA is a new class of multimodal diffusion foundation models, enabling state-of-the-art performance in reasoning, multimodal understanding, and text-to-image generation.
|
| 609 |
+
</p>
|
| 610 |
+
<p style="font-size: 15px;">
|
| 611 |
+
π <a href="https://arxiv.org/abs/2505.15809" target="_blank">Paper</a>
|
| 612 |
+
|
|
| 613 |
+
π» <a href="https://github.com/Gen-Verse/MMaDA" target="_blank">Code</a>
|
| 614 |
+
</p>
|
| 615 |
+
</div>
|
| 616 |
+
""")
|
| 617 |
with gr.Row():
|
| 618 |
model_select_radio = gr.Radio(
|
| 619 |
label="Select Text Generation Model",
|