Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
7d76a44
Sanitize execution cache inputs
Mar 14, 2026
0c1bfad
Merge branch 'Comfy-Org:master' into master
xmarre Mar 14, 2026
2adde5a
Keep container types in sanitizer
Mar 14, 2026
3908689
Fix sanitize_signature_input
Mar 14, 2026
4d9516b
Fix caching sanitization logic
Mar 14, 2026
880b51a
Harden to_hashable against cycles
Mar 14, 2026
4b431ff
Add missing docstrings
Mar 14, 2026
6728d4d
Revert "Harden to_hashable against cycles"
Mar 14, 2026
3568b82
Revert "Add missing docstrings"
Mar 14, 2026
1af99b2
Update caching hash recursion
Mar 14, 2026
1451001
Add docstrings for cache signature hardening helpers
Mar 14, 2026
31ba844
Add cycle detection to signature input sanitization
Mar 14, 2026
17863f6
Add comprehensive docstrings for cache key helpers
Mar 14, 2026
2bea0ee
Simplify Unhashable sentinel implementation
Mar 14, 2026
e069617
Merge branch 'Comfy-Org:master' into master
xmarre Mar 14, 2026
08063d2
Merge branch 'Comfy-Org:master' into master
xmarre Mar 14, 2026
1693dab
Merge branch 'master' into master
xmarre Mar 14, 2026
763089f
Merge branch 'master' into master
xmarre Mar 15, 2026
aceaa5e
fail closed on ambiguous container ordering in cache signatures
Mar 15, 2026
064eec2
Merge branch 'master' into master
xmarre Mar 15, 2026
117afbc
Add docstrings and harden signature
Mar 15, 2026
77bc7bd
Merge branch 'master' of https://github.com/xmarre/ComfyUI
Mar 15, 2026
fadd79a
Fix nondeterministic set signing
Mar 15, 2026
9feb269
Change signature cache to bail early
Mar 15, 2026
0b51219
Adopt single-pass signature hashing
Mar 15, 2026
a6624a9
Unify signature sanitize and hash
Mar 15, 2026
24fdbb9
Replace sanitize hash two pass
Mar 15, 2026
dbed5a1
Replace sanitize and hash passes
Mar 15, 2026
f1d91a4
Prevent canonicalizing is_changed
Mar 15, 2026
4c5f829
Restrict is_changed canonicalization
Mar 15, 2026
088778c
Stop canonicalizing is_changed
Mar 15, 2026
9f9d37b
Merge branch 'master' into master
xmarre Mar 16, 2026
fce22da
Prevent signature traversal of raw
Mar 16, 2026
bff714d
Fix non-link input cache signature
Mar 16, 2026
6158cd5
Prevent redundant signature rewalk
Mar 16, 2026
a6472b1
Fix to_hashable traversal stack handling
Mar 16, 2026
1a00f77
Stop traversing dict keys
Mar 16, 2026
ce05e37
Stop canonicalizing dict keys
Mar 16, 2026
6e3bd33
Prevent dict key canonicalization
Mar 16, 2026
c1ce002
Stop requeueing live containers
Mar 16, 2026
fdcc38b
Return Unhashable on missing node
Mar 17, 2026
e13da81
Fix shallow is_changed handling
Mar 18, 2026
c702cdd
Fix shallow is_changed logic
Mar 18, 2026
5e74e9b
Merge pull request #1 from xmarre/codex/fix-cache-signature-shallow-c…
xmarre Mar 18, 2026
c9b3f81
Merge branch 'master' into master
xmarre Mar 18, 2026
3143b79
Merge branch 'Comfy-Org:master' into master
xmarre Mar 23, 2026
500ca8e
Merge branch 'Comfy-Org:master' into master
xmarre Mar 25, 2026
ece9063
Merge branch 'master' into master
xmarre Apr 2, 2026
5e9a901
Merge branch 'master' into master
xmarre Apr 14, 2026
c1e9164
Merge branch 'master' into master
xmarre Apr 16, 2026
9c21047
Fix tiled VAE encode memory admission estimate
Apr 16, 2026
1548aee
Merge pull request #3 from xmarre/codex/vae-encode-tiled-admission-fix
xmarre Apr 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion comfy/sd.py
Original file line number Diff line number Diff line change
Expand Up @@ -1086,7 +1086,17 @@ def encode_tiled(self, pixel_samples, tile_x=None, tile_y=None, overlap=None, ti
else:
pixel_samples = pixel_samples.unsqueeze(2)

memory_used = self.memory_used_encode(pixel_samples.shape, self.vae_dtype) # TODO: calculate mem required for tile
if dims == 2:
default_tile_x = 512 if tile_x is None else tile_x
default_tile_y = 512 if tile_y is None else tile_y
tile_shapes = [
(1, pixel_samples.shape[1], min(pixel_samples.shape[2], max(1, default_tile_y)), min(pixel_samples.shape[3], max(1, default_tile_x))),
(1, pixel_samples.shape[1], min(pixel_samples.shape[2], max(1, default_tile_y // 2)), min(pixel_samples.shape[3], max(1, default_tile_x * 2))),
(1, pixel_samples.shape[1], min(pixel_samples.shape[2], max(1, default_tile_y * 2)), min(pixel_samples.shape[3], max(1, default_tile_x // 2))),
]
memory_used = max(self.memory_used_encode(shape, self.vae_dtype) for shape in tile_shapes)
else:
memory_used = self.memory_used_encode(pixel_samples.shape, self.vae_dtype)
model_management.load_models_gpu([self.patcher], memory_required=memory_used, force_full_load=self.disable_offload)

args = {}
Expand Down
Loading