mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-06-28 13:41:18 -03:00
fix(import): request withMeta=true from CivitAI API, fix checkpoint type guard and CivArchive version lookup
- Add &withMeta=true to image info URL so API returns full generation metadata (resources with hash/type) instead of null meta - Fix checkpoint assignment guard: check modelId instead of id so non- checkpoint types (upscaler) are not wrongly set as recipe checkpoint - Skip modelVersionIds loop when resources/civitaiResources already provided LoRAs, preventing hash-resolved duplicates - Fix int/str type comparison in CivArchive get_model_version so version ID matching works correctly
This commit is contained in:
@@ -417,7 +417,7 @@ class CivArchiveClient:
|
||||
|
||||
if version_id is not None:
|
||||
raw_id = version_data.get("id")
|
||||
if raw_id != version_id:
|
||||
if raw_id is not None and str(raw_id) != str(version_id):
|
||||
logger.warning(
|
||||
"Requested version %s doesn't match default version %s for model %s",
|
||||
version_id,
|
||||
|
||||
@@ -56,7 +56,7 @@ class CivitaiClient:
|
||||
self._MAX_CACHE_ENTRIES = 500
|
||||
|
||||
def _build_image_info_url(self, image_id: str) -> str:
|
||||
return f"{self.base_url}/images?imageId={image_id}&nsfw=X"
|
||||
return f"{self.base_url}/images?imageId={image_id}&nsfw=X&withMeta=true"
|
||||
|
||||
async def _make_request(
|
||||
self,
|
||||
|
||||
Reference in New Issue
Block a user