Sign In

Getting Draw Things Metadata to Work on CivitAI (Because A1111 is the Favorite Child)

3

Jan 10, 2025

(Updated: 5 months ago)

tool guide
Getting Draw Things Metadata to Work on CivitAI (Because A1111 is the Favorite Child)

If you’ve ever tried uploading metadata from Draw Things to CivitAI, you might’ve felt like showing up to a fancy dinner party in flip-flops. Why? Because CivitAI only understands Automatic1111’s metadata format, and Draw Things… well, it doesn’t speak that language.

But don’t despair—we’ve cooked up a script to bridge the gap! This little workaround will automatically convert your Draw Things-generated images’ metadata into a format that CivitAI loves. Is it perfect? Not quite. But hey, it gets the job done and saves you from manual metadata gymnastics.

Example Post with Recognized Data

Check out this example post where the magic worked: Example CivitAI Post.

• Caveat #1: I had to manually add the coco-Illustrious-noobai model because its filename doesn’t have any dashes. Without those dashes, the script couldn’t find it on CivitAI. So, if you’re using models with quirky filenames, be ready for a little extra manual effort.

• Caveat #2: Another image in the post features a model not listed on CivitAI. Naturally, no recognition was possible. Remember, this workaround can’t conjure data that doesn’t exist in the first place!

PS: Script is attached to this article

Features

  • Extracts metadata from PNG files generated by Draw Things

  • Converts metadata to Automatic1111 (A1111) format

  • Supports LoRA and model hash lookups from CivitAI

  • Handles both PNG and JPEG/WebP formats

  • Preserves original metadata while adding converted data

  • Supports workflow embedding (ComfyUI style)

Installation

  1. Make sure you have Python 3.8 or newer installed

  2. Clone this repository or download the script

  3. Install required dependencies:

    pip install pillow requests piexif

Usage

Basic Usage

Convert a single PNG file

python png_metadata_converter.py --file path/to/image.png

Convert all PNG files in a directory

python png_metadata_converter.py --dir path/to/directory

Convert with custom output directory

python png_metadata_converter.py --dir input_dir --output output_dir

Debug metadata in a file

python png_metadata_converter.py --debug path/to/image.png

Notes

  • The script will attempt to look up model and LoRA hashes from CivitAI if they're not present in the original metadata

  • For non-PNG output formats, metadata is stored in EXIF format

  • The script preserves original metadata while adding the converted format


Requirements

  • Python 3.8+

  • Pillow (PIL)

  • requests

  • piexif (for JPEG/WebP support)


License

MIT License

3