计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
generation【效率与协作】Run and troubleshoot sd-scripts image generation and minimal inference CLIs, including txt2img, img2img, inpainting, prompt files, SDXL conditioning, LoRA/network application, ControlNet/LLLite, and model-family inference scripts.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill when the user wants to generate images, validate prompt files, apply trained LoRA weights during inference, or diagnose generation failures. For LoRA training route to ../training; for model merging/conversion route to ../model-utilities; for dataset TOML route to ../data-preparation.
gen_img.py for SD 1.x, SD 2.x, SDXL, txt2img, img2img, inpainting-by-mask, prompt files, highres fix, LoRA networks, ControlNet, and ControlNet-LLLite.sdxl_gen_img.py when you want the SDXL-focused script surface and the same prompt-file conventions.gen_img_diffusers.py when the model is a Diffusers pipeline/folder and the user wants Diffusers-style loading.inpainting_minimal_inference.py for a small inpainting script with --ckpt_path, --image, --mask, and --sdxl rather than the broader gen_img.py interface.sdxl_minimal_inference.py, sd3_minimal_inference.py, flux_minimal_inference.py, lumina_minimal_inference.py, hunyuan_image_minimal_inference.py, anima_minimal_inference.py, and anima_minimal_inference_control_net_lllite.py.Keep commands model-path agnostic and replace placeholders with the user’s files:
python gen_img.py --ckpt <model.ckpt-or-safetensors-or-diffusers-id> --outdir outputs \
--fp16 --xformers --W 512 --H 768 --steps 30 --sampler k_euler_a \
--prompt "masterpiece, detailed illustration --n low quality, blurry"
python gen_img.py --ckpt <model> --outdir outputs --bf16 --sdpa --no_preview \
--from_file prompts.txt --images_per_prompt 4 --batch_size 2 --seed 1234
python gen_img.py --ckpt <sdxl-model> --sdxl --outdir outputs --bf16 --sdpa \
--original_width 1024 --original_height 1024 --target_width 1024 --target_height 1024 \
--prompt "cinematic studio portrait --n distorted face"
Before running a batch, validate prompt-file syntax without loading models:
python skills/sd-scripts/sub-skills/generation/scripts/validate_prompt_file.py prompts.txt --family gen-img
references/commands.md: command templates for txt2img, img2img, inpainting, SDXL, LoRA, ControlNet, LLLite, and minimal inference scripts.references/prompt-formats.md: prompt-file syntax, negative prompts, prompt weights, dynamic prompts, per-line options, and model-family differences.references/troubleshooting.md: diagnosis for model-family flags, path errors, headless preview, precision artifacts, xformers/SDPA, OOM, LoRA count mismatch, ControlNet mismatches, and offline tokenizer cache.gen_img.py; SD3/Flux/Lumina/Hunyuan/Anima use family minimal inference scripts.--fp16 or --bf16, reduce --batch_size, reduce resolution, then add VAE slicing/offload flags if needed.--network_module with a --network_weights entry for gen_img.py, or use the family script’s --lora_weights/--lora_weight convention.gen_img.py command.--no_preview on servers, containers, CI, SSH sessions, and any headless environment.--sdpa on modern PyTorch when xformers is unavailable; use --xformers only when the package is installed and compatible.--v2 and --v_parameterization; missing --v_parameterization can produce brown images.--bf16, --no_half_vae, lower resolution, or fp32 depending on hardware support.(term:1.2), (term), and [term]; keep generation options separated with spaces, such as prompt text --n bad anatomy --w 768.