Revert seed_assets to only do models root, remove blake3 requirement for now, make posting assets endpoint inaccessible with a 501

This commit is contained in:
Jedrzej Kosinski 2026-01-26 19:28:00 -08:00
parent 702cfcde3a
commit 6a450a8070
5 changed files with 3 additions and 4 deletions

View File

@ -147,6 +147,7 @@ async def create_asset_from_hash(request: web.Request) -> web.Response:
@ROUTES.post("/api/assets")
async def upload_asset(request: web.Request) -> web.Response:
"""Multipart/form-data endpoint for Asset uploads."""
return _error_response(501, "NOT_IMPLEMENTED", "Uploading assets is not implemented yet.")
if not (request.content_type or "").lower().startswith("multipart/"):
return _error_response(415, "UNSUPPORTED_MEDIA_TYPE", "Use multipart/form-data for uploads.")

View File

@ -28,7 +28,6 @@ from app.assets.database.queries import (
)
from app.assets.helpers import resolve_destination_from_tags, ensure_within_base
from app.assets.database.models import Asset
import app.assets.hashing as hashing
def _safe_sort_field(requested: str | None) -> str:

View File

@ -326,7 +326,7 @@ def setup_database():
if dependencies_available():
init_db()
if not args.disable_assets_autoscan:
seed_assets(["models", "input", "output"], enable_logging=True)
seed_assets(["models"], enable_logging=True)
except Exception as e:
logging.error(f"Failed to initialize database. Please ensure you have installed the latest requirements. If the error persists, please report this as in future the database will be required: {e}")

View File

@ -23,7 +23,6 @@ SQLAlchemy
av>=14.2.0
comfy-kitchen>=0.2.7
requests
blake3
#non essential dependencies:
kornia>=0.7.1

View File

@ -689,7 +689,7 @@ class PromptServer():
@routes.get("/object_info")
async def get_object_info(request):
try:
seed_assets(["models", "input", "output"])
seed_assets(["models"])
except Exception as e:
logging.error(f"Failed to seed assets: {e}")
with folder_paths.cache_helper: