Skip to content

Commit

Permalink
- Version Bump
Browse files Browse the repository at this point in the history
  • Loading branch information
regiellis committed Sep 7, 2024
1 parent a44a94f commit 7ee72ec
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 14 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# Changelog

All notable changes to this project will be documented in this file.
## [0.8.2] - 2024-09-04
## [0.8.3] - 2024-09-07
- **Chore**: Update to search and nesting for commands...small fixes. Added air number to stats

## [0.8.3] - 2024-09-04
- **Hotfix**: More fixes for windows.

## [0.8.2] - 2024-09-04
Expand Down
2 changes: 1 addition & 1 deletion civitai_models_manager/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.8.3"
__version__ = "0.8.4"
13 changes: 7 additions & 6 deletions civitai_models_manager/modules/create.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@
import enum as Enum
from typing import Dict, List, Final
from questionary import prompt, select, confirm, autocomplete
import json

from rich import print_json

from civitai_models_manager.modules.helpers import feedback_message
from .utils import safe_get
from .details import get_model_details
from .details import get_model_details, process_model_data

os.environ["CIVITAI_API_TOKEN"] = os.getenv("CIVITAI_TOKEN")
from civitai import image
Expand Down Expand Up @@ -82,9 +81,11 @@ def fetch_job_details():
def create_image_cli(
CIVITAI_MODELS: str, CIVITAI_VERSIONS: str, requested_model: int
) -> None:
pass
# model = get_model_details(CIVITAI_MODELS, CIVITAI_VERSIONS, requested_model)
# print(model.get("air"))

raw_model = get_model_details(CIVITAI_MODELS, CIVITAI_VERSIONS, requested_model)

for v in raw_model.get("versions"):
print(v)

# if safe_get(model, ["air"]) is None:
# urn:air:pony:checkpoint:civitai:439889@686553
Expand Down
9 changes: 3 additions & 6 deletions civitai_models_manager/modules/details.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
from rich.text import Text
from rich.markdown import Markdown
from rich.console import Console
from rich import print_json




__all__ = ["get_model_details_cli"]
Expand Down Expand Up @@ -78,7 +75,7 @@ def get_model_details(
return process_model_data(model_data) if model_data else {}


def process_string(v: Dict[str, Any], data: Dict[str, Any]) -> str:
def process_string(v: Dict[str, Any], data: Dict[str, Any], idx: int) -> str:
# Construct the original string
input_string = f"urn:air:{v.get('baseModel', '')}:{data.get('type', 'checkpoint')}:civitai:{data.get('id')}@{v.get('id')}"

Expand Down Expand Up @@ -115,10 +112,10 @@ def process_model_data(data: Dict) -> Dict[str, Any]:
"download_url": v.get("files", [{}])[0].get("downloadUrl", ""),
"images": v.get("images", [{}])[0].get("url", ""),
"file": v.get("files", [{}])[0].get("name", ""),
"air": process_string(v, data)
"air": process_string(v, data, i)
#f"urn:air:{v.get('baseModel', '')}:{data.get('type', 'checkpoint')}:civitai:{data.get('id')}@{v.get('id')}".lower().replace("flux.1 s", "flux1")
}
for v in data.get("modelVersions", [])
for i, v in enumerate(data.get("modelVersions", []))
]
if not is_version
else []
Expand Down

0 comments on commit 7ee72ec

Please sign in to comment.