↑ An image from the stable diffusion that doesn't explain anything about this project.
This PowerShell script is designed to efficiently convert image files from one format to another, ensuring that the generation data for Stable Diffusion conventional usage is preserved. It serves as a convenient tool for users who require image format conversions while maintaining the integrity of Stable Diffusion generation data.
The converted images are compatible with AUTOMATIC1111/stable-diffusion-webui and Civitai.
- Converts image files from one format to another (e.g., JPG to PNG).
- Supports various image formats including JPG, PNG, and WEBP.
- Ensures the preservation of generation data throughout the entire conversion process.
- PowerShell 7.
- ImageMagick installed on your system.
- ExifTool v12.81 or later installed on your system.
Important
Your ExifTool version must be v12.81 or later to ensure the preservation of generation data during the conversion process. If you are using an older version of ExifTool, please update to the latest version before running the script.
- Clone the repository or download the script.
- Verify that ImageMagick and ExifTool are properly installed on your system.
- Execute the script by running it from the command line.
Caution
Ensure that you have the necessary permissions to execute the script on your system. If you encounter any issues, please check this Microsoft documentation first.
Note
It is necessary to have both copy-info.ps1
and format-converter.ps1
placed in the same directory for format-converter.ps1
to work.
.\format-converter.ps1 <Filter> <TargetImageFileType>
For example, to convert all .jpg
files in the current directory to .png
format, you would run:
.\format-converter.ps1 *.jpg .png
Check the Microsoft documents for more information about the Filter.
If you want to convert exactly one file, you can specify the file name directly:
.\format-converter.ps1 example.jpg .png
GNU GENERAL PUBLIC LICENSE Version 3
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.