Commit Graph

5278 Commits

Author SHA1 Message Date
0f54ce13ee Merge branch 'master' into feat/api-nodes/openrouter 2026-05-21 11:28:02 -07:00
03e511862e Fix reshaping lora application (#14031)
* ModelPatcherDyanmic: purge stale vbar allocs on force cast

* ModelPatcherDynamic: restore backups before load

If doing a clean reload, mutative changes (lora application) could be
applied on-top of the already loaded weight. Restore from backup
unconditionally so that the new load is clean.
2026-05-21 09:47:16 -07:00
aab41a9ddb fix(lanczos): correct dimension transposition for single-channel tensors (#12679) 2026-05-21 23:47:20 +08:00
4259a0c7c3 Update MoGe nodes display names, search aliases and descriptions (#14030) 2026-05-21 16:50:09 +08:00
af3d9b60af chore: Dataset nodes clean-up (CORE-237) (#14002) 2026-05-21 15:14:16 +08:00
7b7c5fed7c Update MediaPipe nodes to standardize with existing code base (CORE-242) (#14025) 2026-05-21 14:39:30 +08:00
1668aaf037 openapi: remove cloud-only job_ids query param from GET /api/assets (#14016)
The job_ids query parameter on GET /api/assets is tagged x-runtime:
[cloud] and only exists for cloud's variant of this endpoint. Cloud
removed all consumers and the cloud-side handler/codegen/tests in
Comfy-Org/cloud#3778. With cloud no longer accepting this parameter,
the [cloud-only] documentation here is wrong — drop it so the daily
sync to cloud/services/ingest/vendor/openapi.yaml propagates the
removal.
2026-05-20 21:32:08 -07:00
ea174d3f12 fix(openapi): correct POST /api/assets/import to importPublishedAssets (#14027)
The operation at POST /api/assets/import was defined as `importAssets`
with a URL-list body shape, but no runtime actually serves that
operation at this path. The cloud runtime serves a different operation
here — `importPublishedAssets` — which imports published-workflow
assets into the caller's library by ID, not by URL.

Cloud's URL-based asset ingestion lives at separate paths
(POST /assets/download + GET /assets/remote-metadata) tracked
elsewhere; nothing in this PR affects that work.

Changes:

- Replace the operation at POST /api/assets/import with
  `importPublishedAssets`, taking ImportPublishedAssetsRequest
  (published_asset_ids + optional share_id) and returning
  ImportPublishedAssetsResponse (list of AssetInfo).
- Remove the unused AssetImportRequest component schema (no other
  references in the spec).
- Operation and schemas tagged x-runtime: [cloud] with [cloud-only]
  description prefix, matching the existing convention for
  cloud-runtime-only operations elsewhere in the spec.

Spectral lint passes (0 errors); the two hint-level findings on
the spec are pre-existing and unrelated.

No FE consumer references AssetImportRequest today; this is a pure
spec correction to match what the cloud runtime actually serves.
2026-05-20 21:28:16 -07:00
9f9b32ed97 feat: add OAuth 2.1 + RFC 7591 DCR endpoints to openapi.yaml (#14026)
Add the OAuth 2.1 authorization flow and RFC 7591 Dynamic Client
Registration endpoints to the shared spec, alongside the existing
auth-tagged operations (/api/auth/session, /api/auth/token,
/.well-known/jwks.json). All tagged x-runtime: [cloud] with a
[cloud-only] description prefix, following the established
convention for cloud-runtime-only operations.

Endpoints:

- GET  /.well-known/oauth-authorization-server  (RFC 8414 metadata)
- GET  /.well-known/oauth-protected-resource    (RFC 9728 metadata)
- GET  /oauth/authorize                         (consent challenge)
- POST /oauth/authorize                         (consent submission)
- POST /oauth/token                             (RFC 6749 §3.2)
- POST /oauth/register                          (RFC 7591 §3.1 DCR)

Component schemas added:

- OAuthAuthorizationServerMetadata
- OAuthProtectedResourceMetadata
- OAuthConsentChallenge, OAuthConsentChallengeWorkspace
- OAuthAuthorizeRedirectResponse
- OAuthTokenResponse, OAuthTokenError
- OAuthRegisterRequest, OAuthRegisterResponse, OAuthRegisterError

These endpoints are implemented in the cloud runtime today and
are called by browser frontends rendering the consent UI and by
MCP-spec-compliant clients (Claude Desktop, Cursor, etc.) doing
auto-discovery + self-registration. Documenting them in the
shared spec lets the cloud frontend generate types directly from
this spec instead of maintaining a parallel definition.

Spectral lints clean (0 errors). The hint-level findings on
OAuthTokenError / OAuthRegisterError ("standard error schema")
match the same hint on CloudError — these are protocol-specific
RFC-shaped errors, not generic application errors.
2026-05-20 21:22:12 -07:00
95fdc6cf91 Repo security stuff. (#14019) 2026-05-20 17:17:55 -07:00
5aa5ccc9e0 Multi-threaded load of models from disk (big load time speedups & Offload to disk) (CORE-43,CORE-152,CORE-164,CORE-165,CORE-117) (#13802)
* model_management: disable non-dynamic smart memory

Disable smart memory outright for non dynamic models.

This is a minor step towards deprecation of --disable-dynamic-vram
and the legacy ModelPatcher.

This is needed for estimate-free model development, where new models
can opt-out of supplying a memory estimate and not have to worry
about hard VRAM allocations due to legacy non-dynamic model patchers

This is also a general stability increase for a lot of stray use cases
where estimates may still be off and going forward we are not going
to accurately maintain such estimates.

* pinned_memory: implement with aimdo growable buffer

Use a single growable buffer so we can do threaded pre-warming on
pinned memory.

* mm: use aimdo to do transfer from disk to pin

Aimdo implements a faster threaded loader.

* Add stream host pin buffer for AIMDO casts

Introduce per-offload-stream HostBuffer reuse for pinned staging,
include it in cast buffer reset synchronization.

Defer actual casts that go via this pin path to a separate pass
such that the buffer can be allocated monolithically (to avoid
cudaHostRegister thrash).

* remove old pin path

* Implement JIT pinned memory pressure

Replace the predictive pin pressure mechanism with JIT PIN memory
pressure.

* LowVRAMPatch: change to two-phase visit

* lora: re-implement as inplace swiss-army-knife operation

* prepare for multiple pin sets

* implement pinned loras

* requirements: comfy-aimdo 0.4.0

* ops: remove unused arg

This was defeatured in aimdo iteration

* ops: sync the CPU with only the offload stream activity

This was syncing with the offload stream which itself is synced with the
compute stream, so this was syncing CPU with compute transitively. Define
the event to sync it more gently.

* pins: implement freeing intermediate for pinned memory

Pinning is more important than inactive intermediates and the stream
pin buffer is more important than even active intermediates.

* execution: implement pin eviction on RAM presure

Add back proper pin freeing on RAM pressure

* implement pin registration swaps

Uncap the windows pins from 50% by extending the pool and have a pressure
mechanism to move the pin reservations om demand.

This unfortunately implies a GPU sync to do the freeing so significant
hysterisis needs to be added to consolidate these pressure events.

* cli_args/execution: Implement lower background cache-ram threshold

Limit the amount of RAM background intermediates can use, so that
switching workflows doesn't degrade performance too much.

* make default

* bump aimdo

* model-patcher: force-cast tiny weights

Flux 2 gets crazy stalls due to a mix of tiny and giant weights
creating lopsided steam buffer rotations which creates stalls.

* ops: refactor in prep for chunking

* mm: delegate pin-on-the-way to aimdo

Aimdo is able to chunk and slice this on the way for better CPU->GPU
overlap. The main advantage is the ability to shorten the bus contention
window between previous weight transfer and the next weights vbar
fault.

* bump aimdo

* pinning updates

* specify hostbuf max allocation size

There a signs of virtual memory exhaustion on some linux systems when
throwing 128GB for every little piece. Pass the actual to save aimdo
from over-estimates

* tests: update execution tests for caching

The default caching changed to ram-cache so update these tests
accordingly.

Remove the LRU 0 test as this also falls through to RAM cache.
2026-05-20 17:03:58 -07:00
4d6a058bf1 feat: MediaPipe face detection (CORE-235) (#14009)
* Initial mediapipe face detection support

* Update face_geometry.py

* Account for diff sized batch input

* Model folder placeholder
2026-05-20 16:07:48 -07:00
a8d2519058 ComfyUI v0.22.0 v0.22.0 2026-05-20 13:49:36 -04:00
4efe1ddb5c chore: update workflow templates to v0.9.79 (#14011) 2026-05-20 23:46:20 +08:00
f9c84c94b4 Support Stable Audio 3 model. (#14010) 2026-05-20 11:34:22 -04:00
8956e00c16 [Partner Nodes] fix passing images to Grok LLM
Signed-off-by: bigcat88 <bigcat88@icloud.com>
2026-05-20 16:33:39 +03:00
3bdf87ffa9 [Partner Nodes] add new OpenRouterLLM node
Signed-off-by: bigcat88 <bigcat88@icloud.com>
2026-05-20 15:22:59 +03:00
0a6e3c9d70 [Partner Nodes] add reasoning widget to Anthropic node
Signed-off-by: bigcat88 <bigcat88@icloud.com>
2026-05-20 15:22:58 +03:00
78b5dec6b6 fix: Hunyuan3D 2.1 batch size crashes in attention and forward pass (#13699) 2026-05-20 19:58:49 +08:00
72e3f6081c Add downscale ratio to empty ltxv latent. (#13999) 2026-05-19 20:28:06 -07:00
7ec7b6ffe9 Adding new StringFormat node (#13997) 2026-05-20 10:25:49 +08:00
6887165a9d docs(openapi): tighten workspace API key description field (BE-1004) (#13996)
Aligns the OSS spec with the cloud-side BE-1004 contract:

- createWorkspaceApiKey request body: add maxLength: 5000 to the
  description property (matches cloud's hub_profile.description
  MaxLen(5000) convention; enforced cloud-side via handler check).
- WorkspaceApiKey + WorkspaceApiKeyCreated response schemas:
  mark description as required (cloud's handler always populates
  the field, defaulting to empty string when not supplied on create),
  drop nullable: true, add maxLength: 5000 for symmetry, and clarify
  the doc string ("Always present in responses; empty string when no
  description was supplied on create").

Both schemas are tagged x-runtime: [cloud] at the schema level so the
tightening is correctly scoped — OSS-only implementations are not
required to honor the workspace API keys endpoints at all.

Related cloud PR: Comfy-Org/cloud#3747
2026-05-19 16:55:04 -07:00
cc4d711eb1 feat(openapi): add optional description field to workspace API key schemas (#13993)
* feat(openapi): add optional description field to workspace API key schemas

Add an optional `description` property (type: string) to three
workspace API key schemas in openapi.yaml:

- Inline request body of createWorkspaceApiKey (POST /api/workspace/api-keys)
- WorkspaceApiKey (list/info schema)
- WorkspaceApiKeyCreated (creation response schema)

The field is not added to any `required` array, making it fully
backward-compatible with existing clients.

Refs: BE-1005, BE-1004

Co-authored-by: Matt Miller <mattmillerai@users.noreply.github.com>

* fix(openapi): mark description nullable in workspace API key response schemas

Per CodeRabbit review on PR #13993: the underlying DB column is nullable
varchar (default ''), so the response schemas should permit null to match
stored data reality. Without nullable: true the OpenAPI contract would
require coercion on the handler side or risk a contract violation.

Request schema unchanged — clients shouldn't be sending null on create.
2026-05-19 14:48:47 -07:00
yy
626b082838 Fix typo in ops.py (#11925) 2026-05-20 05:45:04 +08:00
d0328b442d docs(openapi): remove top-level width/height fields on Asset schema (#13973)
These two fields were added recently to the Asset schema as nullable
integers, with the intent of exposing original image dimensions for FE
consumers (cloud-side thumbnailing makes naturalWidth/Height return
the wrong size for an image card's dimension label).

The implementation effort that consumes them subsequently converged on
a different shape — dimensions nested under the existing free-form
`metadata` JSON field as `{kind: "image", width, height}` — to avoid
introducing type-specific flat fields on the canonical Asset shape,
and to leave room for forward-compatible additions (video duration,
fps, etc.) without further schema churn.

This removes the now-unused top-level fields so the spec reflects the
agreed direction. No other schema definitions reference these fields
directly: AssetCreated, AssetUpdated, etc. inherit Asset via allOf and
do not redefine them.

The runtime ingest implementation that would have populated these
fields was not yet shipped, so no clients are relying on the
top-level shape.

Co-authored-by: Alexis Rolland <alexisrolland@hotmail.com>
2026-05-19 10:00:26 -07:00
6b61918a16 docs(openapi): deprecate /api/upload/mask in favor of /api/upload/image (#13968)
Mark the uploadMask operation as deprecated and point clients at
/api/upload/image. The mask-compositing behavior the endpoint provides
(alpha-compositing the supplied mask onto an original_ref image) is now
expected to happen client-side, with the composited result uploaded
through the unified /api/upload/image path.

The endpoint continues to function for older clients; no runtime
behavior changes ship with this commit. Only the OpenAPI annotation
and the human-facing description are updated.
2026-05-19 12:19:51 +08:00
a4382e056e Use temporal downscale to make empty audio latent nodes more reusable. (#13975) 2026-05-19 00:14:30 -04:00
d71cc1c8f2 chore: Various QoL updates of nodes display names, descriptions and categories (CORE-190, CORE-191) (#13830)
* Move detection category under image category

* Add missing categories

* Move detection nodes to detection category

* Move save nodes to image root catefory

* Rename postprocessors

* Move mask category under image

* Move guiders category to parent level at root of sampling category

* Move custom_sampling category to parent level at the root of sampling category

* Modify description of LoRA loaders

* Fix node id SolidMask

* Move VOID Quadmask under image/mask

* Group compositing nodes under image/compositing

* Move load image as mask to image category for consistency with other load image nodes

* Align display name with Load Checkpoint

* Move dataset category under training category

* Rename Number Convert to Conver Number (verb first)

* Rename Canny node

* Revert wanBlockSwap + description

* Add description to RemoveBackground node

* Revert category update of dataset
2026-05-19 00:13:48 -04:00
990a7ae7f2 Initial work to make downscale_ratio_temporal work. (#13972) 2026-05-18 23:01:43 -04:00
df2454b47e Reduce min for Batch Image/Mask/Latent nodes from 2 to 1 (#13721) 2026-05-19 09:50:14 +08:00
292814c31e feat: Add optional attention_mask input to LTXVAddGuide (CORE-220) (#13965) 2026-05-19 05:07:04 +08:00
187e5237e1 Fix BiRefNet issue (#13966) 2026-05-19 05:03:22 +08:00
164a9d4bbb [Partner Nodes] add ByteDance Seed LLM node (#13919)
Signed-off-by: bigcat88 <bigcat88@icloud.com>
2026-05-18 13:06:13 -07:00
16f862f02a implement dynamic clip saving (#13959)
Fix clip saving by doing the same patching process and diffusion
models.
2026-05-18 11:46:40 -07:00
d4c6c9eff8 fix(FeatherMask): correct negative zero indexing for right/bottom feathering (#12881) 2026-05-18 20:22:15 +08:00
264b003286 [Partner Nodes] fix Opus 4.7 sending deprecated temperature parameter (#13955) 2026-05-18 09:53:31 +03:00
971c9e3518 HiDream-O1: support area conditioning (#13944) 2026-05-18 01:17:05 -04:00
b39af210d0 Fix Qwen3.5 text generation with multiple input images (#13943) 2026-05-18 01:16:42 -04:00
aeadb7acaa correct OOM format (#13950) 2026-05-18 12:06:45 +08:00
f48d2a017e Log which quant ops are enabled/emulated. (#13946) 2026-05-17 16:30:54 -04:00
7c4d95d1bc Enhance README with application and cloud links (#13936) 2026-05-16 23:55:43 -04:00
d3607a8e6d feat: Add downscaled IC-LoRA support to LTXVAddGuide (CORE-102) (#13896) 2026-05-16 15:02:57 +08:00
5d5a4554e1 Remove useless option and clarify what lowvram does. (#13922) 2026-05-15 17:59:02 -07:00
33ce449c8b Reduce LTX2.3 peak VRAM when guide_mask is in use (CORE-166) (#13735)
- Reduce peak VRAM by handling self_attn_mask more efficiently
- Fallback to SDPA when self_attention_mask is used
2026-05-16 00:02:27 +03:00
04856acc69 Allow negative batch_index on ImageFromBatch and LatentFromBatch (CORE-195) (#13857) 2026-05-15 22:30:02 +08:00
77e2ed5e01 feat: Support MoGe (CORE-168) (#13878) 2026-05-15 10:34:56 +08:00
b2000029c8 Persists ModelNoiseScale when also patching shift (#13892) 2026-05-14 18:36:17 -07:00
b112f68681 Generalize frontend version warning to all comfy* requirements.txt entries (#13875) 2026-05-14 16:13:30 -07:00
ed78da062c Create SECURITY.md. (#13902) 2026-05-14 16:02:22 -07:00
616cab4f97 Revert "Include workflow_id in all execution WebSocket messages (CORE-198) (#…" (#13901)
This reverts commit 4f6018982d.
2026-05-14 15:35:42 -07:00