Spaces:
Running
on
Zero
Running
on
Zero
Move HURA
Browse files- app.py +22 -21
- requirements.txt +1 -0
app.py
CHANGED
|
@@ -1246,6 +1246,27 @@ with gr.Blocks(css_paths="style_20250314.css", title=title, theme='Surn/beeuty',
|
|
| 1246 |
btn_sketch_alpha_composite = gr.Button("Overlay Sketch on Input Image", elem_id="btn_sketchninput", elem_classes="solid")
|
| 1247 |
gr.Markdown("### <span style='color: red; font-style: bolder;'>Click the pencil to start drawing.</span><br/>Do Not add to image if using a fill model. Black is replaced by fill model.", elem_classes="centered",sanitize_html=False)
|
| 1248 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1249 |
with gr.Column(scale=1, elem_id="filters"):
|
| 1250 |
with gr.Accordion("Image Filters (optional, fun)", open = False):
|
| 1251 |
with gr.Row():
|
|
@@ -1300,26 +1321,6 @@ with gr.Blocks(css_paths="style_20250314.css", title=title, theme='Surn/beeuty',
|
|
| 1300 |
blur_button = gr.Button("Blur Input Image", elem_classes="solid")
|
| 1301 |
blur_sketch_button = gr.Button("Blur Sketch", elem_classes="solid")
|
| 1302 |
blur_hura_button = gr.Button("Blur HURA", elem_classes="solid")
|
| 1303 |
-
with gr.Accordion("Generate Hex Hura Background", open = False):
|
| 1304 |
-
hex_components = hex_hura.render()
|
| 1305 |
-
with gr.Row():
|
| 1306 |
-
hura_alpha_composite_slider = gr.Slider(0,100,50,0.5, label="HURA Transparancy", elem_id="hura_alpha_composite_slider", interactive=True)
|
| 1307 |
-
with gr.Row():
|
| 1308 |
-
hura_button = gr.Button("Composite Input Image", elem_classes="solid")
|
| 1309 |
-
hura_sketch_button = gr.Button("Composite Sketh Image", elem_classes="solid")
|
| 1310 |
-
|
| 1311 |
-
hura_sketch_button.click(
|
| 1312 |
-
fn=composite_with_control_sync,
|
| 1313 |
-
inputs=[sketch_image, hex_components["target_image"], hura_alpha_composite_slider],
|
| 1314 |
-
outputs=[sketch_image],
|
| 1315 |
-
scroll_to_output=True
|
| 1316 |
-
)
|
| 1317 |
-
hura_button.click(
|
| 1318 |
-
fn=composite_with_control_sync,
|
| 1319 |
-
inputs=[input_image, hex_components["target_image"], hura_alpha_composite_slider],
|
| 1320 |
-
outputs=[input_image],
|
| 1321 |
-
scroll_to_output=True
|
| 1322 |
-
)
|
| 1323 |
|
| 1324 |
with gr.Tabs(selected="hex_gen") as input_tabs:
|
| 1325 |
with gr.Tab("HexaGrid Generation", id="hex_gen") as hexa_gen_tab:
|
|
@@ -1494,7 +1495,7 @@ with gr.Blocks(css_paths="style_20250314.css", title=title, theme='Surn/beeuty',
|
|
| 1494 |
prerendered_image_gallery = gr.Gallery(label="Image Gallery", show_label=True, value=build_prerendered_images_by_quality(3,'thumbnail'), elem_id="gallery",
|
| 1495 |
elem_classes="solid", type="filepath", columns=[3], rows=[3], preview=False ,object_fit="contain", height="auto", format="png",allow_preview=False)
|
| 1496 |
with gr.Row():
|
| 1497 |
-
image_guidance_stength = gr.Slider(label="Image Guidance Strength (prompt percentage)", info="applies to Input, Sketch and Template Image",minimum=0, maximum=1.0, value=0.
|
| 1498 |
|
| 1499 |
with gr.Tab("Add Margins", id="margins") as margins_tab:
|
| 1500 |
with gr.Row():
|
|
|
|
| 1246 |
btn_sketch_alpha_composite = gr.Button("Overlay Sketch on Input Image", elem_id="btn_sketchninput", elem_classes="solid")
|
| 1247 |
gr.Markdown("### <span style='color: red; font-style: bolder;'>Click the pencil to start drawing.</span><br/>Do Not add to image if using a fill model. Black is replaced by fill model.", elem_classes="centered",sanitize_html=False)
|
| 1248 |
|
| 1249 |
+
with gr.Accordion("Generate HURA Background", open = False):
|
| 1250 |
+
hex_components = hex_hura.render()
|
| 1251 |
+
with gr.Row():
|
| 1252 |
+
hura_alpha_composite_slider = gr.Slider(0,100,50,0.5, label="HURA Transparancy", elem_id="hura_alpha_composite_slider", interactive=True)
|
| 1253 |
+
with gr.Row():
|
| 1254 |
+
hura_button = gr.Button("Composite Input Image", elem_classes="solid")
|
| 1255 |
+
hura_sketch_button = gr.Button("Composite Sketh Image", elem_classes="solid")
|
| 1256 |
+
|
| 1257 |
+
hura_sketch_button.click(
|
| 1258 |
+
fn=composite_with_control_sync,
|
| 1259 |
+
inputs=[sketch_image, hex_components["target_image"], hura_alpha_composite_slider],
|
| 1260 |
+
outputs=[sketch_image],
|
| 1261 |
+
scroll_to_output=True
|
| 1262 |
+
)
|
| 1263 |
+
hura_button.click(
|
| 1264 |
+
fn=composite_with_control_sync,
|
| 1265 |
+
inputs=[input_image, hex_components["target_image"], hura_alpha_composite_slider],
|
| 1266 |
+
outputs=[input_image],
|
| 1267 |
+
scroll_to_output=True
|
| 1268 |
+
)
|
| 1269 |
+
|
| 1270 |
with gr.Column(scale=1, elem_id="filters"):
|
| 1271 |
with gr.Accordion("Image Filters (optional, fun)", open = False):
|
| 1272 |
with gr.Row():
|
|
|
|
| 1321 |
blur_button = gr.Button("Blur Input Image", elem_classes="solid")
|
| 1322 |
blur_sketch_button = gr.Button("Blur Sketch", elem_classes="solid")
|
| 1323 |
blur_hura_button = gr.Button("Blur HURA", elem_classes="solid")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1324 |
|
| 1325 |
with gr.Tabs(selected="hex_gen") as input_tabs:
|
| 1326 |
with gr.Tab("HexaGrid Generation", id="hex_gen") as hexa_gen_tab:
|
|
|
|
| 1495 |
prerendered_image_gallery = gr.Gallery(label="Image Gallery", show_label=True, value=build_prerendered_images_by_quality(3,'thumbnail'), elem_id="gallery",
|
| 1496 |
elem_classes="solid", type="filepath", columns=[3], rows=[3], preview=False ,object_fit="contain", height="auto", format="png",allow_preview=False)
|
| 1497 |
with gr.Row():
|
| 1498 |
+
image_guidance_stength = gr.Slider(label="Image Guidance Strength (prompt percentage)", info="applies to Input, Sketch and Template Image",minimum=0, maximum=1.0, value=0.9, step=0.01, interactive=True)
|
| 1499 |
|
| 1500 |
with gr.Tab("Add Margins", id="margins") as margins_tab:
|
| 1501 |
with gr.Row():
|
requirements.txt
CHANGED
|
@@ -25,6 +25,7 @@ xformers #==0.0.29.post3
|
|
| 25 |
Haishoku
|
| 26 |
pybind11>=2.12
|
| 27 |
huggingface_hub
|
|
|
|
| 28 |
# git+https://github.com/huggingface/[email protected]#egg=transformers
|
| 29 |
#git+https://github.com/gradio-app/[email protected]
|
| 30 |
#gradio[oauth]
|
|
|
|
| 25 |
Haishoku
|
| 26 |
pybind11>=2.12
|
| 27 |
huggingface_hub
|
| 28 |
+
hf_xet
|
| 29 |
# git+https://github.com/huggingface/[email protected]#egg=transformers
|
| 30 |
#git+https://github.com/gradio-app/[email protected]
|
| 31 |
#gradio[oauth]
|