Common commit

This commit is contained in:
2025-10-16 18:42:32 +07:00
parent 124065d2ac
commit 40c320a1ac
21 changed files with 1916 additions and 379 deletions

View File

@@ -195,14 +195,14 @@ class ModelPackageSubRepository:
'provides': ic_provides,
'version_id': ic_version_id,
'file_id': ic_file_id,
'package_type': ic_package_type,
'package_type': ic_package_type.lower(),
'tags': ic_tags,
'version': ic_version,
'release_date': ic_release_date,
'lineage': ic_lineage,
'images': ic_images,
'images': ic_images or list(),
'size_bytes': ic_size_bytes,
'quantisation': ic_quantisation,
'quantisation': ic_quantisation or '',
'url': ic_url,
'filename': ic_filename,
'model_info': ic_model_info,
@@ -251,14 +251,15 @@ class ModelPackageSubRepository:
for i in range(len(available_to_pull)):
candidate = available_to_pull[i]
quantisation = candidate['quantisation'] or 'N/A'
print(f' {i:<{2}} {candidate['version']:<{10}} {candidate['package_type']:<{10}} {candidate['release_date']:<{25}}'
f' {candidate['lineage']:<{10}} {candidate['quantisation']:<{5}} {format_bytes(candidate['size_bytes']):<{10}} ')
f' {candidate['lineage']:<{10}} {quantisation:<{5}} {format_bytes(candidate['size_bytes']):<{10}} ')
if len(available_to_pull) > 1: to_pull = select_elements(pull_candidates, input("Your choice: "))
else: to_pull = available_to_pull
# Ввод зависимостей
print("Зависимости (введите по одной, пустая строка для завершения):")
print("Зависимости (введите по одной, п1658427устая строка для завершения):")
additional_dependencies = []
while True:
dep = input().strip()
@@ -351,6 +352,7 @@ class ModelPackageSubRepository:
package = ModelPackage(package_path, [], package_info)
self.packages[package.uuid] = package
self.package_names.add(package.name)
self.add_package_to_collection(package.name, 'civit', internal=True)
if collection: self.add_package_to_collection(package.name, collection, category, internal=internal)