mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-24 06:32:12 -03:00
Add metadata saving functionality and enhance LoraCard with usage tips and notes
This commit is contained in:
@@ -52,6 +52,8 @@ async def get_file_info(file_path: str) -> LoraMetadata:
|
||||
modified=os.path.getmtime(file_path),
|
||||
sha256=await calculate_sha256(file_path),
|
||||
base_model="Unknown", # Will be updated later
|
||||
usage_tips="",
|
||||
notes="",
|
||||
from_civitai=True,
|
||||
preview_url=normalize_path(preview_url),
|
||||
)
|
||||
|
||||
@@ -15,6 +15,8 @@ class LoraMetadata:
|
||||
sha256: str # SHA256 hash of the file
|
||||
base_model: str # Base model (SD1.5/SD2.1/SDXL/etc.)
|
||||
preview_url: str # Preview image URL
|
||||
usage_tips: str = "" # Usage tips for the model
|
||||
notes: str = "" # Additional notes
|
||||
from_civitai: bool = True # Whether the lora is from Civitai
|
||||
civitai: Optional[Dict] = None # Civitai API data if available
|
||||
|
||||
|
||||
Reference in New Issue
Block a user