import sys from pathlib import Path sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) from _lib import fal_common # noqa: E402 a, p = fal_common.parse_args() args = { "seed": p.get("seed"), "ss_sampling_steps": p.get("ss_sampling_steps"), "slat_sampling_steps": p.get("slat_sampling_steps"), "mesh_simplify": p.get("mesh_simplify"), "texture_size": p.get("texture_size"), } fal_common.run( endpoint="fal-ai/trellis", arguments=args, outdir=a.outdir, image_path=a.input[0] if a.input else None, extra_args=p.get("extra_args"), out_stem="trellis", )