| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
Feature: HiDiffusion integration (#8787) * Initial implementation of HiDiffusion pipeline * Added URLs to original HiDiffusion repository in documentation and frontend popover. * Added comment next to HiDiffusion in pyproject.toml to clarify its purpose. * Formatting * Import order fix * Add HiDiffusion T1/T2 ratio controls and docs updates * Checks appeasing * Refactor HiDiffusion import and update T2 ratio default value to 0 * Changed to vendoring an updated version of HiDiffusion and removed deps for external dependency * Ruff * Ruff again * chore(api): refresh hidiffusion openapi schema * Fix HiDiffusion cleanup and metadata recall * chore: fix lint import ordering * Fix HiDiffusion cleanup and metadata recall * Move HiDiffusion license notice to repository root * Fix HiDiffusion modular denoise and docs formatting * Bump HiDiffusion node versions and refresh schema * Seed HiDiffusion window attention deterministically * fix: stale HiDiffusion state in cached UNet * Make HiDiffusion teardown transactional * Format HiDiffusion teardown with Ruff --------- Co-authored-by: Jonathan <34005131+JPPhoto@users.noreply.github.com> | 1 个月前 | |
Feature: HiDiffusion integration (#8787) * Initial implementation of HiDiffusion pipeline * Added URLs to original HiDiffusion repository in documentation and frontend popover. * Added comment next to HiDiffusion in pyproject.toml to clarify its purpose. * Formatting * Import order fix * Add HiDiffusion T1/T2 ratio controls and docs updates * Checks appeasing * Refactor HiDiffusion import and update T2 ratio default value to 0 * Changed to vendoring an updated version of HiDiffusion and removed deps for external dependency * Ruff * Ruff again * chore(api): refresh hidiffusion openapi schema * Fix HiDiffusion cleanup and metadata recall * chore: fix lint import ordering * Fix HiDiffusion cleanup and metadata recall * Move HiDiffusion license notice to repository root * Fix HiDiffusion modular denoise and docs formatting * Bump HiDiffusion node versions and refresh schema * Seed HiDiffusion window attention deterministically * fix: stale HiDiffusion state in cached UNet * Make HiDiffusion teardown transactional * Format HiDiffusion teardown with Ruff --------- Co-authored-by: Jonathan <34005131+JPPhoto@users.noreply.github.com> | 1 个月前 | |
fix(fp8): resolve compute dtype instead of reading model.dtype (#9412) * fix(fp8): resolve compute dtype instead of reading model.dtype SDXL with fp8_storage crashed before the UNet was ever called: NotImplementedError: "pow_cuda" not implemented for 'Float8_e4m3fn' After layerwise casting the UNet's weights are float8_e4m3fn, and diffusers derives `model.dtype` from the first parameter — so `unet.dtype` reports a storage-only dtype. The legacy SD/SDXL denoise path used it for every tensor it built, so the latents were created in float8 and the first bit of scheduler math (`sigma ** 2` in `add_noise`) blew up. torch has no arithmetic kernels for float8; it is only valid for weights that the forward hooks cast up per layer. Add `get_model_compute_dtype()`: returns `model.dtype` for normal models and the compute dtype for fp8 ones. The loader records the compute dtype on the model when it applies the cast; if the marker is missing (older cache entry, Krea2 encoder path) the resolver scans for the first non-fp8 float param, which works because the cast skips norm layers. Converted every site that derived a tensor dtype from a possibly-fp8 model: latents, noise, mask, masked_latents, conditioning, IP-Adapter and LoRA patch weights in denoise_latents and tiled_multi_diffusion_denoise_latents, plus the LoRA and T2I-Adapter extensions on the modular path. ControlNet and T2I-Adapter control images had the same latent bug — those configs expose an fp8_storage toggle too, so their control image would have been built in float8. Also point LayerPatcher at the shared FP8_STORAGE_DTYPES constant. Regression test covers the real loader path: `model.dtype` is float8 while the resolver returns fp16, and the resolved dtype survives the scheduler arithmetic that crashed. * fix(fp8): harden compute-dtype marker against double-cast poisoning Review follow-up on the compute-dtype resolver. `_apply_fp8_layerwise_casting` derives the compute dtype from the first parameter and is not idempotent. Called on an already-cast model, the first param is float8, so it would record float8 as the *compute* dtype — and `get_model_compute_dtype` trusts the marker, silently reintroducing the "pow_cuda" not implemented for 'Float8_e4m3fn' crash. Two guards close the class: `set_fp8_compute_dtype` rejects any storage-only dtype, and the cast early-returns when the marker is already present. Move the marker-setting into `_apply_fp8_to_nn_module` itself. It was duplicated at both call sites (load_default and krea2's text encoder), so a third caller would have to remember it — the exact failure the fallback scan exists to paper over. Log a warning when the last-resort fallback fires (fp8 storage, no marker, no non-fp8 float param): it returns the global torch dtype, which is wrong for a bf16-compute model and would otherwise surface as an unexplained mismatch deep in the forward pass. Note the same bug in the vendored HiDiffusion pipeline, which builds control images from `controlnet.dtype` at four sites. Dead code today — only apply_hidiffusion/remove_hidiffusion are imported — but it would reproduce the crash if ever wired up with an fp8 ControlNet. Tests: the float8-marker guard for both fp8 dtypes, the marker is set by the cast itself, and a double cast is a no-op (skipped norm layer stays in compute dtype, hooks registered once). The marker-missing fallback test now simulates a legacy model with delattr instead of locking in the old split. --------- Co-authored-by: Jonathan <34005131+JPPhoto@users.noreply.github.com> | 1 个月前 | |
Feature: HiDiffusion integration (#8787) * Initial implementation of HiDiffusion pipeline * Added URLs to original HiDiffusion repository in documentation and frontend popover. * Added comment next to HiDiffusion in pyproject.toml to clarify its purpose. * Formatting * Import order fix * Add HiDiffusion T1/T2 ratio controls and docs updates * Checks appeasing * Refactor HiDiffusion import and update T2 ratio default value to 0 * Changed to vendoring an updated version of HiDiffusion and removed deps for external dependency * Ruff * Ruff again * chore(api): refresh hidiffusion openapi schema * Fix HiDiffusion cleanup and metadata recall * chore: fix lint import ordering * Fix HiDiffusion cleanup and metadata recall * Move HiDiffusion license notice to repository root * Fix HiDiffusion modular denoise and docs formatting * Bump HiDiffusion node versions and refresh schema * Seed HiDiffusion window attention deterministically * fix: stale HiDiffusion state in cached UNet * Make HiDiffusion teardown transactional * Format HiDiffusion teardown with Ruff --------- Co-authored-by: Jonathan <34005131+JPPhoto@users.noreply.github.com> | 1 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 |