feat: optional step_id for custom output folder names
Allow readable step folders and xcf_stack layer labels via p.step(..., step_id=...) while keeping the per-module auto counter unchanged. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -35,8 +35,8 @@ def main() -> None:
|
||||
existing_outputs=EXISTING_OUTPUTS or None,
|
||||
continue_from=CONTINUE_FROM,
|
||||
) as p:
|
||||
rembg_out = p.step("rembg", inputs="input")
|
||||
grayscale = p.step("gmic_grayscale", inputs="input")
|
||||
rembg_out = p.step("rembg", inputs="input", step_id="rembg_out")
|
||||
grayscale = p.step("gmic_grayscale", inputs="input", step_id="grayscale")
|
||||
gradient_radial_bg = p.step(
|
||||
"imagemagick_fill",
|
||||
inputs="input",
|
||||
@@ -44,34 +44,56 @@ def main() -> None:
|
||||
color2=COLOR2,
|
||||
gradient=True,
|
||||
radial=True,
|
||||
step_id="gradient_radial_bg",
|
||||
)
|
||||
|
||||
rembg_shadow = p.step("gmic", inputs=rembg_out, command=GMIC_DROP_SHADOW)
|
||||
rembg_jpr_smooth = p.step("gmic", inputs=rembg_out, command=GMIC_JPR_SMOOTH)
|
||||
rembg_shadow = p.step(
|
||||
"gmic", inputs=rembg_out, command=GMIC_DROP_SHADOW, step_id="rembg_shadow"
|
||||
)
|
||||
rembg_jpr_smooth = p.step(
|
||||
"gmic", inputs=rembg_out, command=GMIC_JPR_SMOOTH, step_id="rembg_jpr_smooth"
|
||||
)
|
||||
rembg_jpr_smooth_sized = p.step(
|
||||
"imagemagick_scale_crop",
|
||||
inputs=rembg_jpr_smooth,
|
||||
scale=1.05,
|
||||
step_id="rembg_jpr_smooth_sized",
|
||||
)
|
||||
input_bokeh = p.step(
|
||||
"gmic", inputs="input", command=GMIC_BOKEH, step_id="input_bokeh"
|
||||
)
|
||||
input_bokeh = p.step("gmic", inputs="input", command=GMIC_BOKEH)
|
||||
|
||||
# recipe: colorsplash
|
||||
composite_colorsplash = p.step("composite", inputs=[grayscale, rembg_out])
|
||||
composite_colorsplash = p.step(
|
||||
"composite", inputs=[grayscale, rembg_out], step_id="composite_colorsplash"
|
||||
)
|
||||
|
||||
# recipe: rembg-radial-2colors (gradient-radial)
|
||||
composite_radial = p.step("composite", inputs=[gradient_radial_bg, rembg_out])
|
||||
composite_radial = p.step(
|
||||
"composite", inputs=[gradient_radial_bg, rembg_out], step_id="composite_radial"
|
||||
)
|
||||
|
||||
# recipe: original-drop-shadow-rembg
|
||||
shadow_mid = p.step("composite", inputs=["input", rembg_shadow])
|
||||
composite_shadow = p.step("composite", inputs=[shadow_mid, rembg_out])
|
||||
shadow_mid = p.step(
|
||||
"composite", inputs=["input", rembg_shadow], step_id="shadow_mid"
|
||||
)
|
||||
composite_shadow = p.step(
|
||||
"composite", inputs=[shadow_mid, rembg_out], step_id="composite_shadow"
|
||||
)
|
||||
|
||||
# recipe: original-jpr-smooth-rembg
|
||||
smooth_mid = p.step("composite", inputs=["input", rembg_jpr_smooth_sized])
|
||||
composite_smooth = p.step("composite", inputs=[smooth_mid, rembg_out])
|
||||
smooth_mid = p.step(
|
||||
"composite", inputs=["input", rembg_jpr_smooth_sized], step_id="smooth_mid"
|
||||
)
|
||||
composite_smooth = p.step(
|
||||
"composite", inputs=[smooth_mid, rembg_out], step_id="composite_smooth"
|
||||
)
|
||||
|
||||
# recipe: bokeh-oktagon
|
||||
bokeh_mid = p.step("composite", inputs=["input", input_bokeh])
|
||||
composite_bokeh = p.step("composite", inputs=[bokeh_mid, rembg_out])
|
||||
bokeh_mid = p.step("composite", inputs=["input", input_bokeh], step_id="bokeh_mid")
|
||||
composite_bokeh = p.step(
|
||||
"composite", inputs=[bokeh_mid, rembg_out], step_id="composite_bokeh"
|
||||
)
|
||||
|
||||
# recipe: xcf-stack — explicit layer list, bottom to top
|
||||
p.step(
|
||||
|
||||
Reference in New Issue
Block a user