Update tiled_diffusion.py#77
Open
pfpb wants to merge 1 commit into
Open
Conversation
Correct gaussian weights denominator for y_probs
|
Should the tile midpoint be defined the same for both axes, e.g.
I believe the original code is here (line 192-196) and it is symmetric: https://github.com/albarji/mixture-of-diffusers/blob/master/mixdiff/canvas.py |
djdarcy
added a commit
to DazzleNodes/Dazzle-ComfyUI-TiledDiffusion
that referenced
this pull request
Jul 7, 2026
Found by auditing the commit ranges implicated by the issue-#4 reporter's own build bisect (his Jan 18 build clean, June 5+ builds showing a +25-33 GB step at the second run, flat thereafter): Model pinning: the April RoPE machinery stored a strong reference to the diffusion model module on the tiling impl (impl.diffusion_model). The impl survives between runs inside ComfyUI's loaded-model registry via the unet-function wrapper, so with unload nodes in the workflow (his graph carries UnloadModel and UnloadAllModels -- decoded from the workflow embedded in his shared PNG), the next run reloads the model while the old copy stays pinned: two resident copies, ~30 GB for Flux.2 Q8, exactly one stale copy at a time. That predicts his signature precisely: one step at run 2, plateau after, absent on pre-RoPE builds. Now a weakref; the model is strongly held by ComfyUI during sampling, so behavior is unchanged, and unload nodes can actually free it. CUDA control measured clean before and after (3 identical runs: free VRAM 17.4 -> 19.6 -> 20.9 GB -- memory released, no step). reset() lifecycle: a mid-run canvas refresh re-initialized the impl and silently dropped the rope flavour/scale, patch size, and structure_latent (pre-existing since April). These now survive reset alongside the tile settings and seam biases. Tiled VAE on Flux.2: the decoder path crashed on the 32ch VAE (give_pre_end attribute missing); SD-era attributes are now getattr-guarded. Measured on a real 4032x2304 refine of the reporter's own base image: our Tiled VAE Decode deviates from a single-pass decode by mean 1.3/255 (p99 5) vs ComfyUI core VAEDecodeTiled's 4.8/255 (p99 23) -- 3.6x less of the per-tile GroupNorm color/brightness drift that reads as ghosting on flat regions. (His workflow decodes through core VAEDecodeTiled; the drift class matches his ghosting reports on every build back to January.) TD_DIAG=1: one-block diagnostic -- node file hash, method/tile settings, latent_format class/channels/ratio, computed compression, packed flag, rope state, seam biases, torch version, and memory snapshots (cuda allocated/reserved or mps current/driver) at apply and at each run's grid init. Two runs + one console paste shows cross-run retention directly. Also ships (staged earlier): the example workflow now carries the verified coherence recipe (seam_bias_y 0.5, cfg 4; render-verified at 45-tile 4032x2304), and the v0.2.1 changelog entry credits upstream shiimizu#77 (pfpb) for independently catching the per-axis variance defect, per the reporter's own attribution note. Refs #4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Correct gaussian weights denominator for y_probs.