Fix modal window display

This commit is contained in:
Will Miao
2025-01-27 00:42:33 +08:00
parent 87c64f9b71
commit 26a84afb20
6 changed files with 39 additions and 17 deletions

View File

@@ -22,6 +22,7 @@ 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
from_civitai=True,
preview_url="",
)

View File

@@ -13,6 +13,7 @@ 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
from_civitai: bool = True # Whether the lora is from Civitai
civitai: Optional[Dict] = None # Civitai API data if available
@classmethod
@@ -33,4 +34,6 @@ class LoraMetadata:
def update_civitai_info(self, civitai_data: Dict) -> None:
"""Update Civitai information"""
self.civitai = civitai_data
self.civitai = civitai_data