tyfeld
commited on
Commit
·
061cd9c
1
Parent(s):
18dc602
initial
Browse files
app.py
CHANGED
|
@@ -197,7 +197,7 @@ def generate_viz_wrapper_t2i(prompt_text, steps, guidance_scale, mask_schedule="
|
|
| 197 |
|
| 198 |
@torch.no_grad()
|
| 199 |
def generate_viz_wrapper_lm(prompt_text, steps, gen_length, block_length, temperature,
|
| 200 |
-
cfg_scale, remasking_strategy, thinking_mode_lm):
|
| 201 |
global MODEL, TOKENIZER, MASK_ID, DEVICE
|
| 202 |
print(f"thinking_mode_lm: {thinking_mode_lm}")
|
| 203 |
if MODEL is None or TOKENIZER is None or MASK_ID is None:
|
|
@@ -350,7 +350,7 @@ def generate_viz_wrapper_lm(prompt_text, steps, gen_length, block_length, temper
|
|
| 350 |
|
| 351 |
@torch.no_grad()
|
| 352 |
def generate_viz_wrapper(uploaded_image_pil, prompt_text, steps, gen_length, block_length, temperature,
|
| 353 |
-
cfg_scale, remasking_strategy, thinking_mode_mmu):
|
| 354 |
global MODEL, TOKENIZER, MASK_ID, DEVICE
|
| 355 |
|
| 356 |
if MODEL is None or TOKENIZER is None or MASK_ID is None:
|
|
@@ -868,4 +868,4 @@ with gr.Blocks(css=css_styles, theme=theme) as demo:
|
|
| 868 |
|
| 869 |
if __name__ == "__main__":
|
| 870 |
print(f"Starting Gradio App. Attempting to use device: {DEVICE}")
|
| 871 |
-
demo.launch(
|
|
|
|
| 197 |
|
| 198 |
@torch.no_grad()
|
| 199 |
def generate_viz_wrapper_lm(prompt_text, steps, gen_length, block_length, temperature,
|
| 200 |
+
cfg_scale, remasking_strategy, thinking_mode_lm=False):
|
| 201 |
global MODEL, TOKENIZER, MASK_ID, DEVICE
|
| 202 |
print(f"thinking_mode_lm: {thinking_mode_lm}")
|
| 203 |
if MODEL is None or TOKENIZER is None or MASK_ID is None:
|
|
|
|
| 350 |
|
| 351 |
@torch.no_grad()
|
| 352 |
def generate_viz_wrapper(uploaded_image_pil, prompt_text, steps, gen_length, block_length, temperature,
|
| 353 |
+
cfg_scale, remasking_strategy, thinking_mode_mmu=False):
|
| 354 |
global MODEL, TOKENIZER, MASK_ID, DEVICE
|
| 355 |
|
| 356 |
if MODEL is None or TOKENIZER is None or MASK_ID is None:
|
|
|
|
| 868 |
|
| 869 |
if __name__ == "__main__":
|
| 870 |
print(f"Starting Gradio App. Attempting to use device: {DEVICE}")
|
| 871 |
+
demo.launch()
|