Nano Banana 2 Image-to-Image Prompt Structure for Removing Dust Spots from Scanned Documents
Digitizing physical archives often introduces unwanted artifacts like dust specks, hair, and scratches. These imperfections can obscure critical information, making legibility a primary concern for anyone maintaining historical records or legal files. When using AI tools for restoration, the goal is not merely to smooth out the image but to surgically remove noise without blurring the underlying typography. This guide outlines how to construct effective prompts within the Nano Banana 2 image-to-image workflow to achieve clean, archival-quality results.
Understanding the Symptom and Known Facts
The specific symptom we are addressing is the presence of high-contrast, small-scale noise on a background of text. In scanned documents, these appear as white or dark specks that interrupt the flow of characters. The challenge lies in distinguishing between actual document damage and the text itself. If the restoration process is too aggressive, it risks smoothing over fine serifs or thin strokes, rendering the text illegible.
It is important to clarify what Nano Banana is in this context. Nano Banana refers to the AI image generation and editing tool available at /nanobanana2. It is not a skincare brand, bottle, jar, or any physical subject. While Google documents Nano Banana 2 as Gemini 3.1 Flash Image (gemini-3.1-flash-image), users must understand that prompt instructions describe desired outcomes; they do not guarantee identity, label, object, or typography preservation. Therefore, the success of dust removal relies heavily on how clearly the user defines the boundary between the noise and the text in their input.
Separating Plausible Causes from Technical Limitations
When troubleshooting dust removal, it is essential to separate the visual cause of the artifact from the technical limitations of the model. Visually, dust spots are caused by debris on the scanner glass or the paper surface during the capture process. Technically, the limitation arises because AI models interpret all pixel variations as potential content. Without specific guidance, the model might hallucinate new text where there was only a scratch, or conversely, erase parts of the text thinking it is noise.
Furthermore, users must be aware of the distinct capabilities across the product family. Google describes Nano Banana 2 Lite as focused on speed and cost. It is not optimized for multiple reference inputs or multi-turn sequential editing. Do not recommend it for those workflows without explaining this limitation. For complex document restoration where precision is paramount, relying on the standard Nano Banana 2 workflow is generally safer than the Lite version, which may prioritize speed over the nuanced handling required for delicate text preservation.
Diagnosing the Issue with Prompt Engineering
Diagnosing why a previous attempt failed usually comes down to vague prompting. A common mistake is simply asking the tool to "remove dust." This instruction is too broad and does not explicitly protect the text. To diagnose and fix this, the prompt must explicitly state the negative constraint regarding the text while defining the positive action for the noise.
A robust prompt structure should follow this logic:
- Identify the target: Clearly state that the input contains a scanned document.
- Define the defect: Specify "dust spots," "scratches," or "specks" as the elements to remove.
- Protect the asset: Explicitly instruct the model to preserve the original text, font style, and layout.
- Maintain fidelity: Request a clean, high-contrast result that mimics a fresh scan.
For example, you might use a prompt such as: "Remove all dust spots and scratches from this scanned document. Preserve the original text exactly as written without blurring or altering the characters. Maintain the black text on white background contrast."
These are examples of prompt structures. They serve as a starting point for your specific document. You should adapt the language to match the density of the text and the severity of the damage. If the document has faded ink, add instructions to restore contrast without changing the letter shapes.
Verifying the Fix and Final Output
After generating the image, verification is the final step. Compare the output against the original input side-by-side. Check specifically for areas where text was previously obscured by dust. Ensure that no new artifacts have been introduced and that the edges of the letters remain sharp. If the text appears slightly blurred, the prompt likely lacked sufficient emphasis on typography preservation.
If the first attempt does not yield perfect results, consider refining the prompt to be more specific about the texture of the paper or the nature of the scratches. Remember that prompt instructions describe desired outcomes; they do not guarantee identity, label, object or typography preservation. Iteration is a normal part of the process when dealing with complex restoration tasks.
For those looking to experiment with these techniques, you can access the necessary tools directly through the platform. Try Nano Banana to start your own document restoration project today. By carefully structuring your prompts and understanding the model's behavior, you can effectively eliminate dust spots from scanned documents while strictly maintaining the legibility required for archiving.