Image to Image
sdnext_img2imgGenerate new images from input images using prompts and denoising, with options for inpainting, color correction, high-res fix, and control unit conditioning.
Instructions
Generate images from input images with denoising (SD.Next /sdapi/v1/img2img). Supports inpainting via mask (white = repaint), color correction, hires fix, control units, and all txt2img parameters. init_images are base64 (or "upload:" refs).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| xyz | No | XYZ grid parameter sweep configuration. | |
| face | No | Face-driven generation module (FaceID/FaceSwap/PhotoMaker/InstantID). | |
| mask | No | Mask image (white = repaint area) for inpainting. | |
| seed | No | Random seed (-1 = random). | |
| steps | No | Sampling steps. | |
| width | No | Image width in pixels. | |
| height | No | Image height in pixels. | |
| n_iter | No | Number of iterations (batches). | |
| prompt | Yes | Positive prompt. Supports <wildcards> and [style:name] syntax. | |
| styles | No | Style names to apply (from sdnext_list_styles). | |
| tiling | No | Use VAE tiling (saves VRAM, may degrade quality). | |
| cfg_end | No | Legacy CFG end step fraction. | |
| subseed | No | Secondary seed (-1 = random). | |
| cfg_true | No | True CFG scale (SD3/Flux style). | |
| hr_scale | No | High-res fix scale factor. | |
| paste_to | No | Paste result to: "None", "Mask", "Picture". | |
| save_dir | No | Local directory to write returned images into (creates it). | |
| vae_type | No | VAE type: "Full" or "Tiled". | |
| cfg_scale | No | Legacy CFG scale (guidance_scale when guidance_name=CFG). | |
| clip_skip | No | CLIP skip value. | |
| enable_hr | No | Enable high-res fix (two-pass generation). | |
| mask_blur | No | Mask blur radius in pixels. | |
| batch_size | No | Number of images per iteration. | |
| ip_adapter | No | IP adapter conditioning units. | |
| cfg_rescale | No | Legacy CFG rescale. | |
| hr_resize_x | No | High-res fix target width. | |
| hr_resize_y | No | High-res fix target height. | |
| hr_upscaler | No | Upscaler for high-res fix. | |
| init_images | No | Input images for img2img (base64). | |
| save_images | No | Save images to disk. | |
| script_args | No | Script arguments, positional order matching script args. | |
| script_name | No | Script to run (from sdnext_list_scripts). | |
| send_images | No | Return base64 images in response (default true). | |
| cfg_adaptive | No | Adaptive CFG (0-1). | |
| init_control | No | Legacy init_control format. | |
| sampler_name | No | Sampler name (from sdnext_list_samplers), e.g. "euler_a", "dpmpp_2m_sde". | |
| control_units | No | ControlNet/control units to apply. | |
| guidance_name | No | Modular guidance type (e.g. "Default", "CFGZero", "APG"). | |
| guidance_stop | No | Guidance stop step fraction (0-1). | |
| refiner_start | No | Refiner start step fraction (0-1). | |
| refiner_steps | No | Refiner steps (0 = disabled). | |
| detailer_steps | No | Detailer steps. | |
| guidance_scale | No | Modular guidance scale (new SD.Next guidance system). | |
| guidance_start | No | Guidance start step fraction (0-1). | |
| refiner_prompt | No | Refiner prompt override. | |
| detailer_models | No | Detailer model names (from sdnext_list_detailers). | |
| detailer_prompt | No | Detailer prompt. | |
| hr_sampler_name | No | Sampler for high-res fix ("Same as primary" by default). | |
| inpainting_fill | No | Inpaint fill mode: 0=latent, 1=image, 2=blur, 3=latent_noise. | |
| negative_prompt | No | Negative prompt. | |
| alwayson_scripts | No | Always-on script args keyed by script name. | |
| detailer_classes | No | Comma-separated YOLO classes to detail (default: person). | |
| detailer_enabled | No | Enable built-in YOLO detailer. | |
| do_not_save_grid | No | Do not save grid image. | |
| guidance_rescale | No | Guidance rescale (0-1). | |
| inpaint_full_res | No | Inpaint at full resolution. | |
| lora_fuse_native | No | Fuse LoRA via native weights (fast, no TE recompile). | |
| refiner_negative | No | Refiner negative prompt override. | |
| subseed_strength | No | How much to use the subseed (0-1). | |
| detailer_negative | No | Detailer negative prompt. | |
| detailer_strength | No | Detailer denoising strength. | |
| img2img_fix_steps | No | Fix steps for img2img. | |
| lora_force_reload | No | Force LoRA reload. | |
| denoising_strength | No | Denoising strength (0-1). | |
| seed_resize_from_h | No | Resize from height for seed adjustment (-1 = disabled). | |
| seed_resize_from_w | No | Resize from width for seed adjustment (-1 = disabled). | |
| detailer_resolution | No | Detailer resolution. | |
| do_not_save_samples | No | Do not save samples to disk. | |
| include_init_images | No | Include init images in response. | |
| lora_fuse_diffusers | No | Fuse LoRA via diffusers (slower, most compatible). | |
| sd_model_checkpoint | No | Checkpoint model name or filename to use (from sdnext_list_checkpoints). | |
| hr_second_pass_steps | No | Steps for second pass (0 = full steps). | |
| hr_denoising_strength | No | High-res fix denoising strength (0-1). | |
| inpainting_mask_invert | No | Invert inpainting mask. | |
| inpainting_mask_weight | No | Inpainting mask weight (0-1). | |
| img2img_color_correction | No | Enable color correction. | |
| inpaint_full_res_padding | No | Padding for full-res inpaint. | |
| extra_networks_default_multiplier | No | Default multiplier for extra networks mentioned in prompt. |