基本參數
{"prompt": "高質量,精細的恐龍", // 主提示詞"negative_prompt": "模糊,低質量", // 負面提示詞"styles": ["photorealistic", "detailed"], // 應用的風格預設"seed": 42, // 隨機種子,-1為隨機"subseed": -1, // 次級種子"subseed_strength": 0.3, // 次級種子影響強度(0-1)"seed_resize_from_h": -1, // 高度方向上調整種子大小的來源"seed_resize_from_w": -1, // 寬度方向上調整種子大小的來源"sampler_name": "DPM++ 2M Karras", // 采樣器名稱"scheduler": "karras", // 調度器類型"batch_size": 1, // 單次生成的圖像數量"n_iter": 1, // 迭代次數"steps": 30, // 采樣步數"cfg_scale": 7, // 提示詞引導強度"distilled_cfg_scale": 3.5, // 蒸餾模型的CFG縮放"width": 768, // 圖像寬度(像素)"height": 512, // 圖像高度(像素)"restore_faces": true, // 是否使用面部恢復"tiling": false, // 是否生成可平鋪紋理"do_not_save_samples": false, // 是否不保存樣本"do_not_save_grid": false, // 是否不保存網格"eta": 0, // ETA參數"denoising_strength": 0.75, // 去噪強度(0-1)"s_min_uncond": 0, // 最小無條件縮放"s_churn": 0, // 周轉率"s_tmax": 0, // 最大時間步長"s_tmin": 0, // 最小時間步長"s_noise": 0, // 噪聲量"override_settings": { // 臨時覆蓋WebUI設置"sd_model_checkpoint": "dreamshaper_8.safetensors", // 模型檢查點"CLIP_stop_at_last_layers": 2, // CLIP層數"eta_noise_seed_delta": 0, // 噪聲種子增量"sd_vae": "vae-ft-mse-840000.safetensors" // VAE模型},"override_settings_restore_afterwards": true, // 處理完后是否恢復覆蓋的設置"refiner_checkpoint": "sd_xl_refiner_1.0.safetensors", // 細化模型檢查點"refiner_switch_at": 0.8, // 細化模型切換時機(0-1)"disable_extra_networks": false, // 是否禁用額外網絡"firstpass_image": "base64...", // 第一遍圖像(用于img2img)"comments": { // 注釋,可用于存儲元數據"author": "用戶名","creation_date": "2023-10-15"}
}
高分辨率修復參數
{"enable_hr": true, // 是否啟用高分辨率修復"firstphase_width": 512, // 第一階段寬度"firstphase_height": 512, // 第一階段高度"hr_scale": 2, // 高分辨率縮放因子"hr_upscaler": "Latent (bicubic antialiased)", // 高分辨率上采樣器"hr_second_pass_steps": 20, // 高分辨率第二階段步數"hr_resize_x": 1024, // 高分辨率調整后的寬度"hr_resize_y": 1024, // 高分辨率調整后的高度"hr_checkpoint_name": "sd_xl_base_1.0.safetensors", // 高分辨率使用的檢查點"hr_additional_modules": ["photoreal"], // 高分辨率額外模塊"hr_sampler_name": "Euler a", // 高分辨率采樣器"hr_scheduler": "normal", // 高分辨率調度器"hr_prompt": "", // 高分辨率專用提示詞(為空則使用普通提示詞)"hr_negative_prompt": "", // 高分辨率專用負面提示詞"hr_cfg": 8, // 高分辨率CFG值"hr_distilled_cfg": 3.5 // 高分辨率蒸餾CFG值
}
Always-On 腳本參數
"alwayson_scripts": {"controlnet": {"args": [{"enabled": true, // 是否啟用"module": "depth", // 控制模塊類型"model": "diff_control_sd15_depth_fp16 [978ef0a1]", // 模型名稱"weight": 1.0, // 權重"image": "base64...", // Base64編碼的輸入圖像"mask": "base64...", // 遮罩(可選)"resize_mode": 1, // 調整大小模式:0=只調整大小,1=裁剪匹配,2=填充匹配"low_vram": false, // 低VRAM模式"processor_res": 512, // 處理器分辨率"threshold_a": 64, // 閾值A"threshold_b": 64, // 閾值B"guidance_start": 0.0, // 指導開始"guidance_end": 1.0, // 指導結束"control_mode": 0, // 控制模式: 0=平衡, 1=僅提示詞, 2=僅控制"pixel_perfect": false // 像素完美},{"enabled": true, // 可以有多個ControlNet條目"module": "canny","model": "diff_control_sd15_canny_fp16 [3b9d7d0e]",// ... 其他參數}]}
}
腳本和系統參數
{"force_task_id": "12345", // 強制任務ID"sampler_index": "Euler", // 兼容舊版本的采樣器索引"script_name": "ultimate sd upscale", // 腳本名稱"script_args": [true, 64, "復雜參數"], // 腳本參數列表"send_images": true, // 是否在響應中返回圖像"save_images": false, // 是否保存圖像到磁盤"infotext": "custom info text" // 信息文本
}
ADetailer(自動細節增強)
"alwayson_scripts": {"ADetailer": {"args": [{"enabled": true,"ad_model": "face_yolov8n.pt", // 面部檢測模型"ad_prompt": "美麗的臉,高清細節", // 面部提示詞"ad_negative_prompt": "模糊,變形", // 面部負面提示詞"ad_confidence": 0.3, // 檢測置信度"ad_denoising_strength": 0.4, // 去噪強度"ad_inpaint_only_masked": true, // 是否僅修補遮罩區域"ad_inpaint_width": 512, // 修補寬度"ad_inpaint_height": 512, // 修補高度"ad_mask_blur": 4, // 遮罩模糊"ad_dilate_erode": 4 // 擴張/侵蝕}]}
}
DynamicPrompts
"alwayson_scripts": {"Dynamic Prompts": {"args": [true, // 啟用/禁用"強化變體策略", // 變體策略true, // 使用魔術提示"combinatorial", // 組合方法"", // 批次前綴2 // 每個提示詞的變體數量]}
}
X/Y/Z 圖表
"alwayson_scripts": {"X/Y/Z plot": {"args": [true, // 啟用"Prompt S/R", // X類型"Steps", // Y類型"Nothing", // Z類型"cat, dog, bird", // X值"10, 20, 30", // Y值"", // Z值true, // 繪制圖例true, // 保持種子不變"grid" // 繪圖格式]}
}
LoRA 塊權重
"alwayson_scripts": {"LoRA Block Weight": {"args": [true, // 啟用{"lora_name": "my_lora","base_model_weights": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],"base_model_multipliers": [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}]}
}
完整示例
{"prompt": "高質量,精細的恐龍,逼真的鱗片和肌肉細節,自然棲息地","negative_prompt": "模糊,低質量,變形,扭曲的解剖結構","styles": ["photorealistic"],"seed": 42,"subseed": -1,"subseed_strength": 0,"seed_resize_from_h": -1,"seed_resize_from_w": -1,"sampler_name": "DPM++ 2M Karras","scheduler": "karras","batch_size": 1,"n_iter": 1,"steps": 30,"cfg_scale": 7,"distilled_cfg_scale": 3.5,"width": 768,"height": 512,"restore_faces": true,"tiling": false,"do_not_save_samples": false,"do_not_save_grid": false,"eta": 0,"denoising_strength": 0,"s_min_uncond": 0,"s_churn": 0,"s_tmax": 0,"s_tmin": 0,"s_noise": 0,"override_settings": {"sd_model_checkpoint": "F.1-fp8_11G版_flux1-Schnell.safetensors","CLIP_stop_at_last_layers": 2},"override_settings_restore_afterwards": true,"refiner_checkpoint": "sd_xl_refiner_1.0.safetensors","refiner_switch_at": 0.8,"disable_extra_networks": false,"comments": {},"enable_hr": false,"firstphase_width": 0,"firstphase_height": 0,"hr_scale": 2,"hr_upscaler": "Latent (bicubic antialiased)","hr_second_pass_steps": 20,"hr_resize_x": 0,"hr_resize_y": 0,"hr_checkpoint_name": "","hr_additional_modules": [],"hr_sampler_name": "","hr_scheduler": "","hr_prompt": "","hr_negative_prompt": "","hr_cfg": 0,"hr_distilled_cfg": 3.5,"force_task_id": "","sampler_index": "Euler","script_name": "","script_args": [],"send_images": true,"save_images": false,"alwayson_scripts": {"controlnet": {"args": [{"enabled": true,"module": "depth","model": "diff_control_sd15_depth_fp16 [978ef0a1]","weight": 1.0,"image": "base64...","resize_mode": 1,"low_vram": false,"processor_res": 512,"threshold_a": 64,"threshold_b": 64,"guidance_start": 0.0,"guidance_end": 1.0,"control_mode": 0,"pixel_perfect": false}]},"ADetailer": {"args": [{"enabled": true,"ad_model": "face_yolov8n.pt","ad_prompt": "","ad_negative_prompt": "","ad_confidence": 0.3,"ad_denoising_strength": 0.4}]}}
}