Skip to main content
Glama

Image to Image

sdnext_img2img

Generate 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

TableJSON Schema
NameRequiredDescriptionDefault
xyzNoXYZ grid parameter sweep configuration.
faceNoFace-driven generation module (FaceID/FaceSwap/PhotoMaker/InstantID).
maskNoMask image (white = repaint area) for inpainting.
seedNoRandom seed (-1 = random).
stepsNoSampling steps.
widthNoImage width in pixels.
heightNoImage height in pixels.
n_iterNoNumber of iterations (batches).
promptYesPositive prompt. Supports <wildcards> and [style:name] syntax.
stylesNoStyle names to apply (from sdnext_list_styles).
tilingNoUse VAE tiling (saves VRAM, may degrade quality).
cfg_endNoLegacy CFG end step fraction.
subseedNoSecondary seed (-1 = random).
cfg_trueNoTrue CFG scale (SD3/Flux style).
hr_scaleNoHigh-res fix scale factor.
paste_toNoPaste result to: "None", "Mask", "Picture".
save_dirNoLocal directory to write returned images into (creates it).
vae_typeNoVAE type: "Full" or "Tiled".
cfg_scaleNoLegacy CFG scale (guidance_scale when guidance_name=CFG).
clip_skipNoCLIP skip value.
enable_hrNoEnable high-res fix (two-pass generation).
mask_blurNoMask blur radius in pixels.
batch_sizeNoNumber of images per iteration.
ip_adapterNoIP adapter conditioning units.
cfg_rescaleNoLegacy CFG rescale.
hr_resize_xNoHigh-res fix target width.
hr_resize_yNoHigh-res fix target height.
hr_upscalerNoUpscaler for high-res fix.
init_imagesNoInput images for img2img (base64).
save_imagesNoSave images to disk.
script_argsNoScript arguments, positional order matching script args.
script_nameNoScript to run (from sdnext_list_scripts).
send_imagesNoReturn base64 images in response (default true).
cfg_adaptiveNoAdaptive CFG (0-1).
init_controlNoLegacy init_control format.
sampler_nameNoSampler name (from sdnext_list_samplers), e.g. "euler_a", "dpmpp_2m_sde".
control_unitsNoControlNet/control units to apply.
guidance_nameNoModular guidance type (e.g. "Default", "CFGZero", "APG").
guidance_stopNoGuidance stop step fraction (0-1).
refiner_startNoRefiner start step fraction (0-1).
refiner_stepsNoRefiner steps (0 = disabled).
detailer_stepsNoDetailer steps.
guidance_scaleNoModular guidance scale (new SD.Next guidance system).
guidance_startNoGuidance start step fraction (0-1).
refiner_promptNoRefiner prompt override.
detailer_modelsNoDetailer model names (from sdnext_list_detailers).
detailer_promptNoDetailer prompt.
hr_sampler_nameNoSampler for high-res fix ("Same as primary" by default).
inpainting_fillNoInpaint fill mode: 0=latent, 1=image, 2=blur, 3=latent_noise.
negative_promptNoNegative prompt.
alwayson_scriptsNoAlways-on script args keyed by script name.
detailer_classesNoComma-separated YOLO classes to detail (default: person).
detailer_enabledNoEnable built-in YOLO detailer.
do_not_save_gridNoDo not save grid image.
guidance_rescaleNoGuidance rescale (0-1).
inpaint_full_resNoInpaint at full resolution.
lora_fuse_nativeNoFuse LoRA via native weights (fast, no TE recompile).
refiner_negativeNoRefiner negative prompt override.
subseed_strengthNoHow much to use the subseed (0-1).
detailer_negativeNoDetailer negative prompt.
detailer_strengthNoDetailer denoising strength.
img2img_fix_stepsNoFix steps for img2img.
lora_force_reloadNoForce LoRA reload.
denoising_strengthNoDenoising strength (0-1).
seed_resize_from_hNoResize from height for seed adjustment (-1 = disabled).
seed_resize_from_wNoResize from width for seed adjustment (-1 = disabled).
detailer_resolutionNoDetailer resolution.
do_not_save_samplesNoDo not save samples to disk.
include_init_imagesNoInclude init images in response.
lora_fuse_diffusersNoFuse LoRA via diffusers (slower, most compatible).
sd_model_checkpointNoCheckpoint model name or filename to use (from sdnext_list_checkpoints).
hr_second_pass_stepsNoSteps for second pass (0 = full steps).
hr_denoising_strengthNoHigh-res fix denoising strength (0-1).
inpainting_mask_invertNoInvert inpainting mask.
inpainting_mask_weightNoInpainting mask weight (0-1).
img2img_color_correctionNoEnable color correction.
inpaint_full_res_paddingNoPadding for full-res inpaint.
extra_networks_default_multiplierNoDefault multiplier for extra networks mentioned in prompt.
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full behavioral burden and does add genuine value: the mask convention ('white = repaint') is a critical operational detail, and 'init_images are base64 (or "upload:<id>" refs)' informs the agent about input encoding pitfalls. However, it stays silent on output/return behavior, whether files are written to disk, or any side effects—particularly relevant for a tool with save_dir/save_images params.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three well-sequenced sentences: purpose+endpoint first, then capabilities, then a critical input-format note. The most important information is front-loaded, and the list of features in sentence two is an appropriate use of enumeration for such a broad tool, though 'and all txt2img parameters' is slightly cryptic without a pointer to that sibling tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the massive 78-parameter surface with no output schema or annotations, the description provides necessary orientation for the headline subsystems (inpainting, hires, control units) but completely misses several deep feature areas present in the schema: the YOLO detailer, face modules (FaceID/PhotoMaker/InstantID), XYZ grid sweeps, and LoRA fusion. Notably, it fails to disambiguate the confusing legacy-CFG vs. modular-guidance parameter split, which is arguably the biggest agent footgun here.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3 per the rubric. The description provides a useful feature-level map to navigate the 78-parameter space (e.g., pointing to mask, control units, hires fix), but the specific factual content it adds ('white = repaint', 'upload:<id>') largely duplicates the parameter descriptions already present in the schema, so it doesn't deliver significant marginal value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb+resource construction ('Generate images from input images with denoising') and adds the underlying endpoint (SD.Next /sdapi/v1/img2img), which ties it to a concrete implementation. It clearly implies the img2img use case ('from input images'), which differentiates it from the sibling sdnext_txt2img, though it never names that alternative explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies when to use it through an enumeration of capabilities ('Supports inpainting via mask, color correction, hires fix, control units'), which suggests scenarios where this tool shines. However, it never explicitly says 'use X when Y' or excludes alternatives, and with sdnext_txt2img as the obvious sibling, it misses the chance to state when to pick this over text-to-image.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Congenital/sdnext_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server