Notice: MAI Image 2.7 launch limited-time 20% off, covering the full text-to-image and image editing lineup, try it now
Notice: MAGI 2 launch limited-time 20% off, covering text-to-video, image-to-video, and reference-to-video across the board. Try it now
Notice: Seed Audio 1.5 launch limited-time 20% off, covering text-to-audio, video dubbing, audio track separation, and video translation across the board. Try it now
Notice: HeyGen Avatar 6 Turbo is 20% off for a limited time, and all three video pipelines are eligible.Try it now
Notice: Midjourney Niji 8 is now available, 20% off · Create now
Notice: Gemini 3.8 Flash TTS launch limited-time 20% off, with both conversational speech synthesis lines included · Try it now
Notice: Hunyuan Image 3.0 launch limited-time 20% off, for both text-to-image and instruction-based editing · Try it now
Notice: Seed Audio 1.0 launch limited-time 20% off, text-to-speech billed per minute · Try it now
Notice: Limited-time 20% off on the new Eleven v4 and v4 Turbo, text-to-speech included · Try it now
Announcement 1 of 9
Blog

Guide

Hunyuan-Image-3.0 Instruct-Edit Prompt Recipes for Developers

Copy-paste edit instructions for local replacement, style transfer, fidelity wording, and negative lists

Dec 5, 2026 11 min read
Cover image: A pale purple and an ink black solid color plane meet along a crisp hard edge, with a thin purple seam inset along the boundary; the composition is calm and grounded.
On this page

How to structure an instruct-edit prompt

Instruct-edit models respond to the shape of your instruction as much as to its content. A prompt that reads like a casual wish ("make the jacket red") leaves too many decisions to the model. A prompt built as a short, ordered specification gives you output you can actually reason about, compare, and regression-test.

The skeleton that holds up across most edits has three blocks:

  • Target region. Name what you are editing and where it is. "The jacket worn by the person on the left" beats "the jacket" when more than one candidate exists.
  • Change. State the transformation in concrete, observable terms: color, material, object identity, texture, medium.
  • Preserve. Enumerate the things that must survive the edit — subject identity, pose, background, text, framing, lighting.

Written inline, it looks like this:

Edit the jacket worn by the person on the left: replace it with a matte olive-green canvas jacket, same cut and length. Preserve the person's face, hair, pose, hands, the background, and the overall lighting and framing.

Three properties make this skeleton worth adopting before you touch any recipe:

  1. It is ordered. Target first, change second, preserve last. The preserve clause acts as a constraint sweep after the model has committed to the change.
  2. It is scoped. Every clause refers to something visible in the image, so you can point at the output and say whether the instruction was followed.
  3. It is diffable. Because the prompt has fixed blocks, you can change one clause and attribute the output difference to it. That is the whole basis of the iteration loop later in this guide.

Two stylistic rules apply to all three blocks. Avoid stacked adjectives that overlap in meaning ("beautiful, gorgeous, stunning") — they add no constraint and give the model room to reinterpret. Prefer nouns and observable properties over evaluative words. And keep the instruction in one tense and one voice; mixing "replace the…" with "it should look…" fragments the instruction into two competing specs.

Once you are comfortable with the skeleton, every recipe below is just a filled-in version of it. If you want to try these against a live endpoint while reading, the model page for hunyuan-image-3.0/instruct-edit covers the request shape.

Three flat blocks above thin violet lines converging into one wide pale-mauve and ink-black field split by a hard edge.
The prompt skeleton in geometry: three clauses converge into one decisive edit.

Recipe: local replacement without collateral changes

Local replacement is the highest-value instruct-edit operation and the one most likely to leak. The failure mode is familiar: you ask for a new object, and the model also repaints the lighting, nudges the subject's shoulder, and softens the background.

The recipe keeps the change inside a named boundary and then explicitly re-asserts everything outside it.

Replace the coffee cup on the desk with a ceramic mug of the same height and footprint.
Keep the desk surface, the laptop, the cables, and the window light unchanged.
Do not move, resize, or restyle any other object in the frame.

What each line is doing:

  • Same height and footprint constrains the replacement geometrically. Without a size anchor, models tend to resize the new object to fill the visual weight of the old one.
  • Keep … unchanged lists the neighbors, not the whole scene. Naming adjacent objects is more effective than a blanket "keep everything else," because it tells the model what it is being graded on.
  • Do not move, resize, or restyle converts the preserve intent into prohibitions. For local edits, prohibitions are often stronger than affirmations.

A second variant handles people and accessories:

Change the shirt of the person in the center to a plain white t-shirt with a crew neck.
Preserve the face, hair, skin tone, body pose, arms, and the background wall.
Do not alter the necklace or the lighting on the face.

The pattern generalizes: anchor the replacement to a measurable property (size, position, length, neckline), name two or three neighbors to hold still, and add one prohibition for the thing most likely to drift. In portraits, that last slot is almost always face lighting or a worn accessory.

If a replacement keeps spreading, the usual cause is an underspecified target. "The bag" becomes "the canvas tote hanging from the subject's right shoulder, occupying the lower-left quadrant." Specificity in the target block buys you tolerance everywhere else in the prompt.

Recipe: style transfer with controlled scope

Style transfer prompts fail in the opposite direction from replacement prompts: instead of leaking outward, the edit collapses the composition. You ask for a watercolor look and get a new picture that merely resembles the original.

The fix is to define style through medium and texture, not through adjectives. "Make it painterly" is an evaluation. "Render as gouache on cold-press paper with visible brush grain and slightly uneven pigment edges" is a specification.

Restyle the image as a screen print: two flat ink colors, visible halftone dot texture, hard edges, no gradients.
Preserve the composition exactly — same subject position, same crop, same proportions, same background shapes.
Do not add or remove any elements. Do not change the subject's identity or expression.

Two more variants worth keeping on hand:

Render the scene in the style of a mid-century travel poster: bold flat shapes, limited palette, slight paper grain.
Keep all object silhouettes and their placement identical to the source.
Apply a soft graphite sketch treatment: monochrome gray, visible pencil hatching, paper texture.
Preserve all edges and the subject's facial features. Do not smooth or blur line work.

The scope-control clause is "composition exactly — same subject position, same crop, same proportions." Naming crop and proportions matters because style models often re-frame while restyling. And note that every style prompt ends with a preservation clause about identity or silhouettes: texture changes are safe, geometry changes are not.

One caution: avoid naming living artists or specific franchises as style targets. Describe the medium, palette, and texture instead — the output is more controllable, and you avoid the ambiguity of a name the model may interpret loosely.

Two side-by-side abstract compositions with identical line geometry, each splitting pale mauve and ink black flat fields along a thin violet seam.
Same composition, restated: only the surfaces and texture shift while the underlying geometry holds.

Fidelity wording that protects identity

Fidelity is a wording problem, not a parameter. The clauses below are the ones that most reliably keep faces, text, and unmentioned areas intact.

For faces and people:

Preserve facial identity: same face shape, eye shape and spacing, nose, mouth, skin tone, and hairstyle.
Do not change age, expression, or gaze direction.

"Same person" alone is too weak — it lets the model regenerate a plausible face. Enumerating features forces it to treat the face as fixed geometry. Listing "age, expression, gaze" as prohibitions catches the three attributes that drift most.

For text in the image:

Keep all text exactly as written: same characters, same font weight, same position and rotation.
Do not re-render, translate, correct, or embellish any lettering.

Text is where aggressive edits produce the ugliest artifacts — melted glyphs, invented characters. Explicitly forbidding "re-render" and "correct" is worth the extra clause.

For unmentioned areas: use a closing sweep rather than a vague assurance.

Everything not described above must remain pixel-faithful to the source: background, props, lighting direction, shadows, color grade, and framing.

The phrase "pixel-faithful" is a useful anchor, but back it with a short enumeration. Models treat enumerated constraints as checkable and blanket constraints as negotiable.

For color and lighting continuity: when replacing an object, tie it to the scene.

Match the replacement's lighting to the existing scene: same light direction, same shadow softness, same white balance as the surrounding objects.

Without this, replacements read as pasted-in even when geometry is perfect.

Negative lists that prevent drift

A negative list is a reusable block of prohibitions you append to edit prompts. Keep one per project and grow it as you see failures. Prohibitions are cheap in tokens and disproportionately effective against aggressive edits.

A general-purpose starting list:

Negative: no warped or melted text, no extra objects or duplicate limbs, no additional people,
no over-smoothed skin or plastic texture, no changed background, no altered crop or aspect ratio,
no added borders or watermarks, no color shift in untouched regions, no blurring of fine detail.

Tailor per edit type:

  • Replacement: no size change to the replaced object, no new shadows, no duplicated object, no style shift in neighbors.
  • Style transfer: no new elements, no re-framing, no loss of line detail, no identity change, no added texture in the background only.
  • Portrait retouch: no changed eye shape, no altered jawline, no added makeup, no smoothed pores, no changed hairline.

Two rules keep negative lists useful. First, negatives must not contradict the positive instruction — asking for a painterly result while listing "no visible brush strokes" guarantees a muddy compromise. Second, keep the list short and specific to observed failures. A ten-item list copied from a blog post does less work than three items aimed at artifacts you actually saw.

Iterating recipes with small prompt deltas

Prompt tuning degrades into guessing the moment you change three things at once. Treat it as an experiment loop instead.

  1. Start from a recipe and a fixed input image. Do not change the source between runs.
  2. Change exactly one clause. Add one preserve item, tighten one target descriptor, add one negative.
  3. Compare against the previous output, not against your mental model. Note which clause produced the visible difference.
  4. Keep the win, revert the loss. If a clause helps in one recipe, copy it into your shared snippet library.
  5. Re-run the full recipe after any edit. A clause that helped locally can conflict with another block.

A concrete example of a productive delta sequence for local replacement:

v1: Replace the cup with a ceramic mug. Preserve the desk and background.
v2: + same height and footprint        → fixed resizing
v3: + match the existing light direction → fixed pasted-in look
v4: + negative: no duplicated cup     → fixed ghost artifact

Each version changes one thing, and the output difference is attributable. That is the entire method. The corollary is discipline about versioning: save the prompt string alongside the output, or you will not be able to reconstruct which delta did what a week later.

When a recipe stops improving after two or three deltas, the problem is usually the target block — the region is not described precisely enough for any amount of preserve wording to compensate. Go back and sharpen the target rather than adding more prohibitions.

Integrating recipes into an API workflow

The recipes above are just strings, which makes them straightforward to productionize. Three practices carry them from your notes into a pipeline.

Store prompts as versioned templates, not literals. Keep each recipe as a template with slots for the target region and the change, and a fixed preserve/negative tail. That way fidelity wording is applied consistently and improvements propagate to every call site.

template = """Replace {target} with {replacement}.
Keep {neighbors} unchanged. Do not move, resize, or restyle other objects.
Match the existing lighting direction and shadow softness.
Negative: no duplicated objects, no warped text, no background change."""

Validate inputs before the call. Reject requests where the target region is empty or where the negative list contradicts the requested change. Most bad outputs from a production integration trace back to a malformed instruction, not to model capability.

Log the full triple. Store the source image reference, the exact prompt string, and the output. When a user reports drift, you can diff the prompt against the last known-good version and identify the regressing clause in minutes.

Route through one endpoint. Keeping all edit traffic on a single model endpoint means prompt templates, negative lists, and evaluation harnesses stay in one place rather than being re-implemented per provider. The request shape and model details live on the hunyuan-image-3.0/instruct-edit page — wire your template renderer to it and the recipes above become parameters rather than prose.

Start with the three-block skeleton, adopt the two recipes you need first, and grow the negative list from real failures. That loop, more than any single prompt, is what makes instruct-edit predictable in production.

Related articles

View all articles →

Start building with persistent AI artifacts

Get your API key and call image, video and audio models through one task-based API.

Read the API docs