mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-02-07 12:02:37 +08:00
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:
parent
702cfcde3a
commit
6a450a8070
@ -147,6 +147,7 @@ async def create_asset_from_hash(request: web.Request) -> web.Response:
|
|||||||
@ROUTES.post("/api/assets")
|
@ROUTES.post("/api/assets")
|
||||||
async def upload_asset(request: web.Request) -> web.Response:
|
async def upload_asset(request: web.Request) -> web.Response:
|
||||||
"""Multipart/form-data endpoint for Asset uploads."""
|
"""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/"):
|
if not (request.content_type or "").lower().startswith("multipart/"):
|
||||||
return _error_response(415, "UNSUPPORTED_MEDIA_TYPE", "Use multipart/form-data for uploads.")
|
return _error_response(415, "UNSUPPORTED_MEDIA_TYPE", "Use multipart/form-data for uploads.")
|
||||||
|
|||||||
@ -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.helpers import resolve_destination_from_tags, ensure_within_base
|
||||||
from app.assets.database.models import Asset
|
from app.assets.database.models import Asset
|
||||||
import app.assets.hashing as hashing
|
|
||||||
|
|
||||||
|
|
||||||
def _safe_sort_field(requested: str | None) -> str:
|
def _safe_sort_field(requested: str | None) -> str:
|
||||||
|
|||||||
2
main.py
2
main.py
@ -326,7 +326,7 @@ def setup_database():
|
|||||||
if dependencies_available():
|
if dependencies_available():
|
||||||
init_db()
|
init_db()
|
||||||
if not args.disable_assets_autoscan:
|
if not args.disable_assets_autoscan:
|
||||||
seed_assets(["models", "input", "output"], enable_logging=True)
|
seed_assets(["models"], enable_logging=True)
|
||||||
except Exception as e:
|
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}")
|
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}")
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,6 @@ SQLAlchemy
|
|||||||
av>=14.2.0
|
av>=14.2.0
|
||||||
comfy-kitchen>=0.2.7
|
comfy-kitchen>=0.2.7
|
||||||
requests
|
requests
|
||||||
blake3
|
|
||||||
|
|
||||||
#non essential dependencies:
|
#non essential dependencies:
|
||||||
kornia>=0.7.1
|
kornia>=0.7.1
|
||||||
|
|||||||
@ -689,7 +689,7 @@ class PromptServer():
|
|||||||
@routes.get("/object_info")
|
@routes.get("/object_info")
|
||||||
async def get_object_info(request):
|
async def get_object_info(request):
|
||||||
try:
|
try:
|
||||||
seed_assets(["models", "input", "output"])
|
seed_assets(["models"])
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logging.error(f"Failed to seed assets: {e}")
|
logging.error(f"Failed to seed assets: {e}")
|
||||||
with folder_paths.cache_helper:
|
with folder_paths.cache_helper:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user