alexopus / ComfyUI-Image-Saver

Allows you to save images with their generation metadata in ComfyUI. Compatible with Civitai. Works with png, jpeg and webp.
MIT License
31 stars 6 forks source link

Include embedding and lora information in the metadata #2

Closed nickve28 closed 6 months ago

nickve28 commented 6 months ago

This PR will read the given prompts (positive, negative only but extensible if the contract would change) and then, similarly to how other libraries do it, extract the sha of the embeddings and lora's and include them. The format is derived from how civit's a1111 extension enriches their tooling.

Should require no changes to a workflow

Also adds the model hash to those hashes as civit seemed to stop reading those after this change.

Example output

Hashes: {\"embed:EasyNegative\": \"66a7279a88\", \"embed:FastNegativeEmbedding\": \"687b669d82\", \"embed:ng_deepnegative_v1_75t\": \"54e7e4826d\", \"embed:imageSharpener\": \"fe5a4dfc4a\", \"embed:AuroraNegative\": \"e5b5173e82\", \"LORA:epi_noiseoffset2\": \"81680c064e\", \"LORA:GoodHands-beta2\": \"ba43b0efee\", \"model\": \"7b59a31acf\"} Version: ComfyUI",