Spaces:
Running
on
Zero
Running
on
Zero
liujie31
commited on
Commit
·
7562a15
1
Parent(s):
45fa259
delete model call count because restart will reset to inital value
Browse files- app.py +18 -7
- model_call_counter.txt +0 -1
app.py
CHANGED
|
@@ -159,8 +159,19 @@ css = """
|
|
| 159 |
|
| 160 |
with gr.Blocks(css=css) as demo:
|
| 161 |
with gr.Column(elem_id="col-container"):
|
| 162 |
-
gr.Markdown("
|
|
|
|
| 163 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 164 |
with gr.Row():
|
| 165 |
prompt = gr.Textbox(
|
| 166 |
label="Prompt",
|
|
@@ -239,11 +250,11 @@ with gr.Blocks(css=css) as demo:
|
|
| 239 |
value=40, # Replace with defaults that work for your model
|
| 240 |
)
|
| 241 |
|
| 242 |
-
call_count_display = gr.Textbox(
|
| 243 |
-
|
| 244 |
-
|
| 245 |
-
|
| 246 |
-
)
|
| 247 |
gr.on(
|
| 248 |
triggers=[run_button.click, prompt.submit],
|
| 249 |
fn=infer,
|
|
@@ -257,7 +268,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 257 |
num_inference_steps,
|
| 258 |
lora_model,
|
| 259 |
],
|
| 260 |
-
outputs=[result, seed_display
|
| 261 |
)
|
| 262 |
|
| 263 |
if __name__ == "__main__":
|
|
|
|
| 159 |
|
| 160 |
with gr.Blocks(css=css) as demo:
|
| 161 |
with gr.Column(elem_id="col-container"):
|
| 162 |
+
gr.Markdown("""
|
| 163 |
+
# SD3.5 Medium + Flow-GRPO
|
| 164 |
|
| 165 |
+
Our model is trained separately for different tasks, so it’s best to use the corresponding prompt format for each task.
|
| 166 |
+
|
| 167 |
+
**User Guide:**
|
| 168 |
+
1. Select a LoRA model (choose “None” to use the base model)
|
| 169 |
+
2. Click “Sample Prompt” to randomly select from ~1000 task-specific prompts, or write your own
|
| 170 |
+
3. Click “Run” to generate images (a 2×2 grid of 4 images will be produced)
|
| 171 |
+
|
| 172 |
+
**Note:**
|
| 173 |
+
- For the *Text Rendering* task, please enclose the text to be displayed in **double quotes (`"`)**, not single quotes (`'`)
|
| 174 |
+
""")
|
| 175 |
with gr.Row():
|
| 176 |
prompt = gr.Textbox(
|
| 177 |
label="Prompt",
|
|
|
|
| 250 |
value=40, # Replace with defaults that work for your model
|
| 251 |
)
|
| 252 |
|
| 253 |
+
# call_count_display = gr.Textbox(
|
| 254 |
+
# label="Model Call Count",
|
| 255 |
+
# value=f"Model has been called {get_call_count()} times",
|
| 256 |
+
# interactive=False
|
| 257 |
+
# )
|
| 258 |
gr.on(
|
| 259 |
triggers=[run_button.click, prompt.submit],
|
| 260 |
fn=infer,
|
|
|
|
| 268 |
num_inference_steps,
|
| 269 |
lora_model,
|
| 270 |
],
|
| 271 |
+
outputs=[result, seed_display],
|
| 272 |
)
|
| 273 |
|
| 274 |
if __name__ == "__main__":
|
model_call_counter.txt
DELETED
|
@@ -1 +0,0 @@
|
|
| 1 |
-
190
|
|
|
|
|
|