From ef38bda04fe870f3f964cb067a1f7a42a692b63e Mon Sep 17 00:00:00 2001 From: Will Miao Date: Sun, 15 Mar 2026 22:06:04 +0800 Subject: [PATCH] docs: remove redundant example metadata files (#856) - Delete examples/metadata/ directory and all example files - Real metadata.json files in model roots are better examples - Examples were artificial and could become outdated - Maintenance burden outweighs benefit - Remove 'Complete Examples' section from docs/metadata-json-schema.md - Remove reference to example files in 'See Also' section Rationale: Users have access to real-world metadata.json files in their actual model directories, which contain complete Civitai API responses with authentic data structures (images arrays with prompts, files with hashes, creator information, etc.). These are more valuable than simplified artificial examples. --- docs/metadata-json-schema.md | 163 -------------------- examples/metadata/checkpoint-civitai.json | 41 ----- examples/metadata/embedding-custom.json | 24 --- examples/metadata/lora-civitai.json | 57 ------- examples/metadata/lora-custom.json | 34 ---- examples/metadata/lora-no-triggerwords.json | 25 --- 6 files changed, 344 deletions(-) delete mode 100644 examples/metadata/checkpoint-civitai.json delete mode 100644 examples/metadata/embedding-custom.json delete mode 100644 examples/metadata/lora-civitai.json delete mode 100644 examples/metadata/lora-custom.json delete mode 100644 examples/metadata/lora-no-triggerwords.json diff --git a/docs/metadata-json-schema.md b/docs/metadata-json-schema.md index 88bf3940..4fc7f037 100644 --- a/docs/metadata-json-schema.md +++ b/docs/metadata-json-schema.md @@ -314,168 +314,6 @@ These fields can be edited by users at any time through the Lora Manager UI or b --- -## Complete Examples - -### Example 1: LoRA from Civitai - -```json -{ - "file_name": "anime_style_lora", - "model_name": "Anime Style LoRA", - "file_path": "/models/loras/anime_style_lora.safetensors", - "size": 104857600, - "modified": 1710000000.0, - "sha256": "abc123def456...", - "base_model": "SDXL", - "preview_url": "/models/loras/anime_style_lora.preview.png", - "preview_nsfw_level": 0, - "notes": "", - "from_civitai": true, - "civitai": { - "id": 12345, - "modelId": 67890, - "name": "v1.0", - "baseModel": "SDXL", - "trainedWords": ["anime style", "cel shading"], - "model": { - "name": "Anime Style LoRA", - "description": "A LoRA for anime-style images", - "tags": ["anime", "style", "cel shading"] - } - }, - "tags": ["anime", "style", "cel shading"], - "modelDescription": "A LoRA for anime-style images", - "civitai_deleted": false, - "favorite": true, - "exclude": false, - "db_checked": true, - "skip_metadata_refresh": false, - "metadata_source": "civitai_api", - "last_checked_at": 1710100000.0, - "hash_status": "completed", - "usage_tips": "{\"strength_min\":0.3,\"strength_max\":0.8,\"strength\":0.6}" -} -``` - -### Example 2: LoRA Not from Civitai (User-Defined) - -```json -{ - "file_name": "custom_effect_lora", - "model_name": "My Custom Effect LoRA", - "file_path": "/models/loras/custom_effect_lora.safetensors", - "size": 52428800, - "modified": 1710000000.0, - "sha256": "def789abc123...", - "base_model": "SD1.5", - "preview_url": "/models/loras/custom_effect_lora.preview.png", - "preview_nsfw_level": 0, - "notes": "Custom trained LoRA for special effects", - "from_civitai": true, - "civitai": { - "trainedWords": ["custom_effect", "special_fx"], - "customImages": [ - { - "url": "custom_example_1.png", - "seed": 12345, - "prompt": "example prompt 1" - } - ] - }, - "tags": ["custom", "experimental", "effects"], - "modelDescription": "My custom trained LoRA for creating special visual effects", - "civitai_deleted": false, - "favorite": false, - "exclude": false, - "db_checked": false, - "skip_metadata_refresh": false, - "metadata_source": null, - "last_checked_at": 1710100000.0, - "hash_status": "completed", - "usage_tips": "{\"strength\":0.7}" -} -``` - -### Example 2b: LoRA Without Trigger Words - -```json -{ - "file_name": "no_trigger_lora", - "model_name": "LoRA Without Trigger Words", - "file_path": "/models/loras/no_trigger_lora.safetensors", - "size": 10485760, - "modified": 1710000000.0, - "sha256": "abc123...", - "base_model": "SDXL", - "preview_url": "", - "preview_nsfw_level": 0, - "from_civitai": true, - "civitai": {}, - "tags": ["abstract"], - "modelDescription": "A LoRA with no trigger words", - "metadata_source": null, - "hash_status": "completed", - "usage_tips": "{}" -} -``` - -### Example 3: Checkpoint Model - -```json -{ - "file_name": "realistic_checkpoint", - "model_name": "Realistic Vision v5", - "file_path": "/models/checkpoints/realistic_v5.safetensors", - "size": 6943152000, - "modified": 1710000000.0, - "sha256": "ghi456jkl789...", - "base_model": "SDXL", - "preview_url": "/models/checkpoints/realistic_v5.preview.png", - "preview_nsfw_level": 0, - "from_civitai": true, - "civitai": { - "id": 54321, - "modelId": 98765, - "name": "v5.0", - "type": "Checkpoint", - "trainedWords": ["realistic photo"], - "model": { - "name": "Realistic Vision", - "type": "Checkpoint", - "tags": ["realistic", "photorealistic"] - } - }, - "tags": ["realistic", "photorealistic"], - "modelDescription": "Photorealistic checkpoint model", - "model_type": "checkpoint", - "metadata_source": "civitai_api", - "hash_status": "completed" -} -``` - -### Example 4: Embedding Model - -```json -{ - "file_name": "bad_hand_fix", - "model_name": "Bad Hand Fix", - "file_path": "/models/embeddings/bad_hand_fix.pt", - "size": 512000, - "modified": 1710000000.0, - "sha256": "mno789pqr012...", - "base_model": "SDXL", - "preview_url": "", - "from_civitai": false, - "civitai": {}, - "tags": ["fix", "hands"], - "modelDescription": "Embedding to fix bad hands", - "model_type": "embedding", - "metadata_source": null, - "hash_status": "completed" -} -``` - ---- ## Field Reference by Behavior @@ -523,4 +361,3 @@ These fields can be edited by users at any time through the Lora Manager UI or b ## See Also - [JSON Schema Definition](../.specs/metadata.schema.json) — Formal JSON Schema for validation -- [Example Files](../examples/metadata/) — Sample metadata.json files diff --git a/examples/metadata/checkpoint-civitai.json b/examples/metadata/checkpoint-civitai.json deleted file mode 100644 index ab674928..00000000 --- a/examples/metadata/checkpoint-civitai.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "file_name": "realistic_vision_v5", - "model_name": "Realistic Vision v5.0", - "file_path": "/home/user/ComfyUI/models/checkpoints/realistic_vision_v5.safetensors", - "size": 6943152000, - "modified": 1710000000.0, - "sha256": "ghi456jkl789012345678901234567890123456789012345678901234567ijkl", - "base_model": "SDXL", - "preview_url": "/home/user/ComfyUI/models/checkpoints/realistic_vision_v5.preview.png", - "preview_nsfw_level": 0, - "from_civitai": true, - "civitai": { - "id": 54321, - "modelId": 98765, - "name": "v5.0", - "description": "Realistic Vision v5.0 - photorealistic checkpoint", - "baseModel": "SDXL", - "type": "checkpoint", - "trainedWords": ["realistic photo", "photorealistic"], - "model": { - "name": "Realistic Vision", - "description": "A photorealistic checkpoint model for SDXL", - "tags": ["realistic", "photorealistic", "portrait", "landscape"] - }, - "creator": { - "id": 44444, - "name": "CheckpointCreator" - } - }, - "tags": ["realistic", "photorealistic", "portrait", "landscape"], - "modelDescription": "Photorealistic checkpoint model optimized for portraits and landscapes. Works best with positive prompts.", - "civitai_deleted": false, - "favorite": true, - "exclude": false, - "db_checked": true, - "skip_metadata_refresh": false, - "metadata_source": "civitai_api", - "last_checked_at": 1710100000.0, - "hash_status": "completed", - "sub_type": "checkpoint" -} diff --git a/examples/metadata/embedding-custom.json b/examples/metadata/embedding-custom.json deleted file mode 100644 index e21fb3c3..00000000 --- a/examples/metadata/embedding-custom.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "file_name": "bad_hand_fix", - "model_name": "Bad Hand Fix Embedding", - "file_path": "/home/user/ComfyUI/models/embeddings/bad_hand_fix.pt", - "size": 512000, - "modified": 1710000000.0, - "sha256": "mno789pqr012345678901234567890123456789012345678901234567890mnop", - "base_model": "SDXL", - "preview_url": "", - "preview_nsfw_level": 0, - "from_civitai": false, - "civitai": {}, - "tags": ["fix", "hands", "negative"], - "modelDescription": "Textual inversion embedding to fix bad hands in generated images. Use in negative prompts.", - "civitai_deleted": false, - "favorite": false, - "exclude": false, - "db_checked": false, - "skip_metadata_refresh": false, - "metadata_source": null, - "last_checked_at": 1710100000.0, - "hash_status": "completed", - "sub_type": "embedding" -} diff --git a/examples/metadata/lora-civitai.json b/examples/metadata/lora-civitai.json deleted file mode 100644 index a019abf2..00000000 --- a/examples/metadata/lora-civitai.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "file_name": "anime_style_lora", - "model_name": "Anime Style LoRA", - "file_path": "/home/user/ComfyUI/models/loras/anime_style_lora.safetensors", - "size": 104857600, - "modified": 1710000000.0, - "sha256": "abc123def456789012345678901234567890123456789012345678901234abcd", - "base_model": "SDXL", - "preview_url": "/home/user/ComfyUI/models/loras/anime_style_lora.preview.png", - "preview_nsfw_level": 0, - "notes": "", - "from_civitai": true, - "civitai": { - "id": 12345, - "modelId": 67890, - "name": "v1.0", - "description": "Version 1.0 release", - "baseModel": "SDXL", - "trainedWords": ["anime style", "cel shading"], - "model": { - "name": "Anime Style LoRA", - "description": "A LoRA for creating anime-style images with cel shading effects", - "tags": ["anime", "style", "cel shading", "illustration"] - }, - "files": [ - { - "id": 11111, - "name": "anime_style_lora.safetensors", - "sizeKB": 102400, - "primary": true - } - ], - "images": [ - { - "id": 22222, - "url": "https://example.com/preview.png", - "nsfwLevel": 0 - } - ], - "creator": { - "id": 33333, - "name": "ModelCreator", - "image": "https://example.com/avatar.png" - } - }, - "tags": ["anime", "style", "cel shading", "illustration"], - "modelDescription": "A LoRA for creating anime-style images with cel shading effects. Works best with SDXL models and anime checkpoints.", - "civitai_deleted": false, - "favorite": true, - "exclude": false, - "db_checked": true, - "skip_metadata_refresh": false, - "metadata_source": "civitai_api", - "last_checked_at": 1710100000.0, - "hash_status": "completed", - "usage_tips": "{\"strength_min\":0.3,\"strength_max\":0.8,\"strength\":0.6,\"clip_strength\":0.5}" -} diff --git a/examples/metadata/lora-custom.json b/examples/metadata/lora-custom.json deleted file mode 100644 index f172a2d9..00000000 --- a/examples/metadata/lora-custom.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "file_name": "custom_effect_lora", - "model_name": "My Custom Effect LoRA", - "file_path": "/home/user/ComfyUI/models/loras/custom_effect_lora.safetensors", - "size": 52428800, - "modified": 1710000000.0, - "sha256": "def789abc123456789012345678901234567890123456789012345678901efgh", - "base_model": "SD1.5", - "preview_url": "/home/user/ComfyUI/models/loras/custom_effect_lora.preview.png", - "preview_nsfw_level": 0, - "notes": "Custom trained LoRA for special effects", - "from_civitai": true, - "civitai": { - "trainedWords": ["custom_effect", "special_fx"], - "customImages": [ - { - "url": "custom_example_1.png", - "seed": 12345, - "prompt": "example prompt 1" - } - ] - }, - "tags": ["custom", "experimental", "effects"], - "modelDescription": "My custom trained LoRA for creating special visual effects", - "civitai_deleted": false, - "favorite": false, - "exclude": false, - "db_checked": false, - "skip_metadata_refresh": false, - "metadata_source": null, - "last_checked_at": 1710100000.0, - "hash_status": "completed", - "usage_tips": "{\"strength\":0.7}" -} diff --git a/examples/metadata/lora-no-triggerwords.json b/examples/metadata/lora-no-triggerwords.json deleted file mode 100644 index 1a99a0cf..00000000 --- a/examples/metadata/lora-no-triggerwords.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "file_name": "no_trigger_lora", - "model_name": "LoRA Without Trigger Words", - "file_path": "/home/user/ComfyUI/models/loras/no_trigger_lora.safetensors", - "size": 10485760, - "modified": 1710000000.0, - "sha256": "abc123def456789012345678901234567890123456789012345678901234wxyz", - "base_model": "SDXL", - "preview_url": "", - "preview_nsfw_level": 0, - "notes": "", - "from_civitai": true, - "civitai": {}, - "tags": ["abstract"], - "modelDescription": "A LoRA with no trigger words", - "civitai_deleted": false, - "favorite": false, - "exclude": false, - "db_checked": false, - "skip_metadata_refresh": false, - "metadata_source": null, - "last_checked_at": 1710100000.0, - "hash_status": "completed", - "usage_tips": "{}" -}