You can run AUTOMATIC1111 scripts like X/Y/Z Plot by passing script_name="X/Y/Z Plot" and a list of arguments to script_args.
Important Note on Arguments:
- Boolean values (like
draw_legend, include_lone_images, etc.) must be passed as strings ("True" or "False"), not Python Booleans. - Axis types (X, Y, Z) are passed as the index of the axis type from the available options list.
Available Axis Options (txt2img):
Nothing, Seed, Var. seed, Var. strength, Steps, Hires steps, CFG Scale, Prompt S/R, Prompt order, Sampler, Checkpoint name, Sigma Churn, Sigma min, Sigma max, Sigma noise, Eta, Clip skip, Denoising, Hires upscaler, VAE, Styles.
Available Axis Options (img2img):
Nothing, Seed, Var. seed, Var. strength, Steps, CFG Scale, Image CFG Scale, Prompt S/R, Prompt order, Sampler, Checkpoint name, Sigma Churn, Sigma min, Sigma max, Sigma noise, Eta, Clip skip, Denoising, Cond. Image Mask Weight, VAE, Styles.
XAxisType = "Steps"
XAxisValues = "20,30"
XAxisValuesDropdown = ""
YAxisType = "Sampler"
YAxisValues = "Euler a, LMS"
YAxisValuesDropdown = ""
ZAxisType = "Nothing"
ZAxisValues = ""
ZAxisValuesDropdown = ""
drawLegend = "True"
includeLoneImages = "False"
includeSubGrids = "False"
noFixedSeeds = "False"
marginSize = 0
result = api.txt2img(
prompt="cute girl with short brown hair in black t-shirt in animation style",
seed=1003,
script_name="X/Y/Z Plot",
script_args=[
XYZPlotAvailableTxt2ImgScripts.index(XAxisType),
XAxisValues,
XAxisValuesDropdown,
XYZPlotAvailableTxt2ImgScripts.index(YAxisType),
YAxisValues,
YAxisValuesDropdown,
XYZPlotAvailableTxt2ImgScripts.index(ZAxisType),
ZAxisValues,
ZAxisValuesDropdown,
drawLegend,
includeLoneImages,
includeSubGrids,
noFixedSeeds,
marginSize,
]
)