1. Development Background and Purpose
While working with AUTOMATIC1111, unexpected events such as Windows errors, sudden system shutdowns, WebUI crashes, or even a cat pressing the PC's reset button can interrupt the image production process.
Accidentally clicking the orange Generate button can also replace the existing txt2img gallery with newly generated images.
In these situations, the previously saved PNG files remain on the drive, but the gallery used for image selection and further processing is lost.
When working with hundreds or thousands of images, recovering the workflow can be time-consuming. The process often involves opening an external image viewer, searching for specific images, importing them into the WebUI, and reconfiguring the generation parameters.
I developed Restore to simplify this process. Its primary purpose is to restore previously saved images directly to the original txt2img gallery and allow users to resume their image production workflow with minimal effort.
2. Main Features
Restore is a free, open-source extension for AUTOMATIC1111 with the following features:
- Restore up to 2,000 saved PNG images in one click. (If anyone requires a higher limit, I can modify the extension to support 10,000, 100,000, or more images.)
- Read the generation metadata embedded in PNG files.
- Automatically detect the default txt2img output directory.
- Allow users to specify a different image directory.
- Restore images directly to the existing txt2img gallery.
- Resume image selection, Hires. fix, ADetailer, and other supported processing functions.
- Preserve all original image files.
- Operate within the existing WebUI environment without additional software or dependencies.
The demonstration video shows the restoration of 100 saved images and subsequent image processing using Hires. fix and ADetailer.
3. Installation
- Launch AUTOMATIC1111 Stable Diffusion WebUI.
- Navigate to Extensions → Install from URL.
- Enter the following repository URL:
https://github.com/flynbird-cyber/Restore.git
- Leave the remaining fields blank and click Install.
- Navigate to the Installed tab and confirm that Restore is enabled.
- Click Apply and restart UI.
Once the WebUI has restarted, the Restore menu will be available in the txt2img interface.
4. Usage
- Open the txt2img tab.
- Expand the Restore menu.
- Confirm the image directory. Restore automatically detects the default txt2img output directory. You may also specify a different directory containing the images you wish to restore.
- Set the number of recent images to restore. The default value is 1,000, with an adjustable range of 1 to 2,000.
- Click Restore PNGs to txt2img gallery.
Restore retrieves the requested number of recent PNG images from the specified directory and displays them directly in the existing txt2img gallery.
Once the gallery has been restored, users can browse and select images and resume further processing within the txt2img interface.
For example, to upscale a restored image, select the image and click the existing Hires. fix button (✨). ADetailer and other compatible processing functions can also be used with the current WebUI and extension settings.
This allows users to resume their work without manually importing individual images or reconstructing the entire image selection workflow.
5. Compatibility and Testing
- AUTOMATIC1111 Stable Diffusion WebUI v1.10.x
- Gradio 3.41.x
- Successfully tested with 10, 100, and 1,000 saved PNG images. All tests completed without issues.
- Hires. fix and ADetailer functionality tested successfully using restored images.
- Current maximum restoration limit: 2,000 images.
The current release is designed for AUTOMATIC1111. Depending on community interest, I plan to expand compatibility to Forge and reForge and explore the development of a dedicated version for ComfyUI.
6. Restoration Scope and Requirements
Restore is designed to recover interrupted image production workflows.
The extension restores saved PNG images and reads their embedded generation metadata. Subsequent image processing uses the applicable functions and current settings of the WebUI and installed extensions. Complete restoration of previous WebUI and extension settings is outside the scope of the current release.
The original PNG files must remain in the specified directory for gallery restoration. Images permanently deleted from the drive or removed from the specified directory cannot be restored to the gallery.
All original image files are preserved throughout the restoration process.
7. GitHub Repository and Documentation
Restore is completely free and open source under the AGPL-3.0 license.
GitHub Repository
https://github.com/flynbird-cyber/Restore
Demonstration Video, Screenshots, and Detailed User Guide
https://github.com/flynbird-cyber/Restore/issues/1
Official Release — v1.0.0
https://github.com/flynbird-cyber/Restore/releases/tag/v1.0.0
Please feel free to visit the GitHub repository and try the extension. If you find it useful, I would appreciate a star.
Feedback, technical suggestions, and requests for additional features are welcome.
I hope Restore helps you resume your work more efficiently, even if your cat presses the reset button again.
And between us, the best feature of Restore is that you can generously forgive your cat instead of getting into a fight with it.
Note: I'm Korean and live in Seoul. As I'm not fluent in English, I use a translator for this post and my replies. Please excuse any awkward wording.