Eyes4AI Text Repair
Find misspelled text in photos and AI-generated images with Gemini, then use an image-editing workflow to fix localized text and review spelling and style. Includes check-only and SenseNova U1.6 examples.
Eyes4AI Text Repair for ComfyUI
Check and repair spelling in photos and AI-generated images. Gemini scans the image and overlapping close-ups for typos. The planner gives your editor precise spelling instructions and a cropped view of the original lettering. Gemini transcribes the actual edit and checks its style before it can be saved. The SenseNova example automatically retries failed targets once and reports any words that remain unresolved.
| Start here | What it does | | --- | --- | | Check text only | Upload an image and see the proposed spelling fixes. This graph uses Gemini and runs without an image-edit model. | | SenseNova U1.6 automatic repair | Upload an image and run the full SenseNova example. It repairs localized crops and saves the reviewed result. |
Install
Clone this repository into ComfyUI/custom_nodes/ and restart ComfyUI. The package uses Requests, PyTorch, and Pillow from a standard ComfyUI installation. If Requests is missing, install requirements.txt using the same Python environment as ComfyUI.
cd ComfyUI/custom_nodes
git clone https://github.com/bewizsky/eyes4ai-text-repair.git
If you installed the earlier standalone eyes4ai_hosted_text_repair folder, move it out of custom_nodes before installing this package. Both versions use the same node IDs so existing graphs can load. The Eyes4AI Kaggle notebook already bundles the earlier version in its own session.
Set up Gemini
- Create a key for a free-tier project in Google AI Studio.
- Set
GEMINI_API_KEYin the environment that launches ComfyUI, then restart the process. In Kaggle use Add-ons → Secrets and grant the notebook access. - Run a workflow. Add Preview Any to the planner's
repair_reportoutput to display proposed fixes. Use the review node's report to see what actually passed.
The nodes use Gemini 3.1 Flash-Lite. The analysis call sends a resized copy of the input image to Google, plus overlapping close-ups for larger images. Each review sends before-and-after crops. The scan can plan up to 24 targets per image. Free API access depends on region and quota, and Google may use free-tier inputs to improve its services. Gemini API keys · Pricing and free-tier data use
Use the nodes with your own image editor
Find the three nodes under Eyes4AI → Text repair.
| Node | How to wire it |
| --- | --- |
| Gemini Lettering Analysis and Repair Plan | Connect your source IMAGE. Send style_reference_crops to the editor's source image input and edit_instruction to its prompt. For masked editors, send edit_masks to the mask input. White marks the editable region. |
| Blend Lettering Into the Original | Connect the source image to original, the editor's decoded images to edited, and the planner's needs_edit and repair_regions to the matching inputs. |
| Gemini Spelling and Style Review | Connect the original image, the blend output as candidate, and the planner's repair_regions. Connect image to Save Image and repair_report to Preview Any. |
The planner emits aligned lists of prompts, image crops, and masks. It gives distinct words separate jobs unless their editable pixels overlap. Each prompt names the exact replacement, specifies which letters change and where, and describes the matching lettering. Use an editor that keeps the crop framing and returns one image per crop in order. Set its latent or image batch size to 1. Convert the prompt widget to an input if it has no socket. Derive width and height from the reference crop when needed.
To add an automatic retry, connect the first review node's retry_instruction, retry_crops, and optionally retry_masks to a second editor pass. Use the first review's image as the second blend's original image and needs_retry and retry_regions for its other inputs. Review that blend again with the same original and retry regions. Connect the first review's report to the second review's prior_report, then save the second review's image. The second editor runs only when there are rejected repairs to retry. The SenseNova example has all of these connections.
Run the SenseNova example
-
Use ComfyUI with native SenseNova U1.6 support. The example was checked against the ComfyUI build used by the Eyes4AI notebook.
-
Download the two files from Comfy-Org/SenseNova-U1 on Hugging Face and place them under the corresponding model folders.
| File | Folder | | --- | --- | |
sensenova_u1.6_8b_mot_int8_convrot.safetensors|ComfyUI/models/checkpoints/| |sensenova_u1.6_8b_mot_8step_lora_bf16.safetensors|ComfyUI/models/loras/| -
Import the example workflow, upload one broken-text image, and click Run. Read Repair results and remaining typos to see what was applied and what still needs attention. The weights total 18.44 GB before runtime files and outputs. The Eyes4AI Kaggle notebook shows how to set up the model on Kaggle.
The check-only and full repair graphs were tested with simulated Gemini responses and a local ComfyUI CPU editor substitute. Visual results depend on the selected image editor and input. Live Gemini, SenseNova on Kaggle T4, and other image models have not been verified for this standalone release.
The SenseNova example adapts the Comfy Org image-edit template. Its original MIT notice is included.