A Go library for reading and writing image generation parameters for images produced by Fooocus and various forks.
- Read embedded metadata (PNG, EXIF) for image files generated by Fooocus.
- Read metadata from the Private Log file as fallback if metadata was not embedded into the original file.
- Write metadata to PNG, which can be loaded into Fooocus through
Input Image > Metadata
.
This library is intended to be used programmatically. It includes a command line tool to read metadata from a file, which serves as a usage example.
Tested with Fooocus version 2.1 and newer.
Fooocus supports two metadata schemes:
fooocus
(json) - the native scheme.a1111
(plain text) - for compatibility with Civitai.
This library fully supports the native fooocus
scheme.
Partial support for reading the a1111
scheme is provided by the generic A1111-style metadata parser, but it does not support any Fooocus-specific keys.
Image Format | Metadata Location | Metadata Scheme | Read | Write |
---|---|---|---|---|
PNG | Embedded | fooocus |
✅ | ✅ |
JPG, WEBP | Embedded | fooocus |
✅ | ❌ |
* | Embedded | a1111 |
❌ | |
PNG, JPG, WEBP | External (Private Log) | fooocus |
✅ | ❌ |
Tested with FooocusPlus version 1.0.0 and newer.
Image Format | Metadata Location | Metadata Scheme | Read | Write |
---|---|---|---|---|
PNG | Embedded | JSON | ✅ | ✅ |
JPG, WEBP | Embedded | JSON | ✅ | ❌ |
PNG, JPG, WEBP | External (Private Log) | JSON | ✅ | ❌ |
Tested with RuinedFooocus version 2.0.0 and newer.
Image Format | Metadata Location | Metadata Scheme | Read | Write |
---|---|---|---|---|
PNG | Embedded | JSON | ✅ | ✅ |
Basic read-only support for metadata encoded in a1111
(plain text) format. Unsupported keys are ignored.
Tested with:
Image Format | Metadata Location | Metadata Scheme | Read | Write |
---|---|---|---|---|
PNG, JPEG, WEBP | Embedded | a1111 |
✅ | ❌ |