v1.1.0+v1.2.0: complete 14 schedulers + Karras, SD v2.1/SDXL support, release-chain repair - #3
Open
Windsander wants to merge 17 commits into
Open
v1.1.0+v1.2.0: complete 14 schedulers + Karras, SD v2.1/SDXL support, release-chain repair#3Windsander wants to merge 17 commits into
Windsander wants to merge 17 commits into
Conversation
… mapping
- unipc: implement full predictor-corrector math (lambda-space exponential
integrator + Lagrange interpolation, EDM sample-space convention),
replacing the segfaulting empty stub (returned {} vectors)
- unipc: add SD_LAMBDA_JUMP_CAP order-reduction guard for huge final
lambda jumps (generalizes diffusers lower_order_final)
- unipc: verified on turbo t2i 1/4/8 steps, i2i, CFG 7.5, v15 20 steps
- build: fix auto_build.sh mapping macOS arm64 to aarch64 (toolchain
expects arm64, caused FATAL_ERROR on Apple Silicon)
- cli: correct help text to list all 8 schedulers & both tokenizers
- docs: tick uni_pc in README checklist, add PLAN-supplement.md
- new AvailableSigmaType (public) / SigmaType (internal) enums, appended to scheduler config structs (additive, v1.1.0 ABI window) - SchedulerBase::init karras branch: rho=7 sigma ramp between training-schedule sigma_min/sigma_max, sigma->timestep inversion via bisection on the same generate_sigma_at curve - CLI --sigma [default/karras] option + help/params/summary output - verified: sigma sequence matches diffusers use_karras_sigmas exactly; turbo 4-step inference green with euler_a/unipc + default control
- ported from diffusers 0.39 DPMSolverMultistepScheduler source and translated to EDM sample space (x_vp = alpha * x_edm equivalence verified numerically to float32 precision) - final zero-sigma step uses order-1 (x0-prediction), matching diffusers lower_order_final + final_sigmas_type=zero behavior - registered as SCHEDULER_DPM_M=8 / CLI 'dpm_m'; verified on turbo 4-step, v15 20-step, and the canonical DPM++ 2M Karras combo
- two-eval-per-step structure reusing the Heun correction_steps trick, but with TRUE midpoint sigmas/timesteps at odd indices so base scale/time/x0-conversion stays self-consistent - shared ancestral update with euler_a-style in-class RandomGenerator, noise scaled by random_intensity (diffusers s_noise) - final zero-sigma phase degenerates to x0-prediction - verified: turbo 4-step (notably clean), v15 20-step + karras
- two-eval-per-step structure with true midpoint sigmas/timesteps at odd indices: order-1 deterministic half-step (even) + full-interval 2S correction driven by both x0 predictions (odd) - EDM translation of diffusers DPMSolverSinglestepScheduler dpmsolver++ midpoint update; final zero-sigma phase returns x0-prediction - completes the DPM++ family (dpm_m / dpm_sde / dpm_s); verified on turbo 4-step and v15 20-step + karras
….x support)
- UNet timestep: query declared element type/rank (legacy int64 {1} vs
newer float scalar) and feed accordingly; clone call sites honor it
- CLIP input_ids: tokenizer emits int32; cast to int64 when the text
encoder declares it
- ModelBase::execute swallows ORT exceptions - with mismatched tensors
the models silently returned zeros and output decoded to pure noise
- add TensorHelper::cast and ModelBase::model_input_element_type
(keep TypeInfo alive while reading its unowned view)
…I window) - IOrtSDConfig: append onnx_clip_2_path (ABI extension, v1.2.0) - Clip: use_penultimate option (hidden_states[-2] by output name), pooled output capture (pooler_output/text_embeds), ORT-allocated execution path for variable-arity encoder exports - Context: dual text encoders, last-dim hidden concat (768+1280=2048), pooled conditioning from text_encoder_2 - UNet: SDXL 5-input binding (text_embeds + time_ids [h,w,0,0,h,w]) - TensorHelper::concat_last_dim; CLI --clip2
- add CHANGELOG.md (referenced by auto-publish body_path and asset copies) - auto-publish: checkout@v4, setup-python@v5, gh CLI release creation, softprops/action-gh-release@v2 asset upload (create-release@v1 and upload-release-asset@v1 are node12-retired) - auto-deploy: checkout/upload-artifact/download-artifact@v2 -> v4 (v2 hard-retired by GitHub); deploy_linux job formally disabled per decision 0.4; fix missing artifact download in update_homebrew_formula - create local branch release/release-v1.2.0 at tag for the publish flow
- sd/io-test/run_smoke_matrix.sh: 19-case quick / 24-case full matrix with hard gates (ORT exception count, output size, flat-pixel check); quick matrix verified 19/19 green locally - auto_prepare_sd_models.sh: auto_convert_sd_next for onnx-sd-v21-768 (sd2-community mirror, HF stabilityai repos now gated) and onnx-sdxl-turbo (from local safetensors checkout)
…cklist truthfulness) - fix example command: bpe needs vocab.json + --merges (was vocab.txt, no merges) - add verified v2.1/SDXL/karras examples + per-model parameter table - check parent Strategy/Sampling boxes; mark v2.0 & SDXL-base untested - note published packages are v1.0.1 pending release chain; wp -> word_piece
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.
Summary
Two release windows in one review (baseline: v1.0.1, 17 commits, +2048/−199):
v1.1.0 — Samplers & sigma strategy (all 14 schedulers usable)
--sigma): value-identical to diffusersuse_karras_sigmasdpm_m(2M),dpm_s(2S),dpm_sde(2nd-order midpoint), ported from diffusers 0.39 into the framework's EDM sample space (max deviation 2.4e-07)pndm(prk+plms),ipndm(paper-form AB4+DDIM update — diffusers' ADM-grid variant verified unusable for SD),deis_m(log-rho Lagrange integrator, order 1→3)v1.2.0 — Model generation expansion
hidden_states[-2]per encoder, feature-dim concat (768+1280→2048), pooled embedding +time_idsmicro-conditioning; new--clip2; single ABI extension (IOrtSDConfig.onnx_clip_2_path) concentrated in this windowCI / release chain repair
CHANGELOG.md(referenced by auto-publish)create-release@v1/upload-release-asset@v1→ gh CLI +softprops/action-gh-release@v2;upload/download-artifact@v2→ v4 (v2 hard-retired by GitHub)deploy_linuxformally disabled per decision 0.4; fix missing artifact download inupdate_homebrew_formulasd/io-test/run_smoke_matrix.sh(19/24-case smoke matrix with ORT-exception, size, and flat-pixel gates) and extendauto_prepare_sd_models.shto v2.x/SDXL conversion channelsValidation
Notes for reviewers
include/adi.h— append-only enum additions + one struct field append (onnx_clip_2_path); both releases deliberately share one ABI windowModelBase::executestill swallows ORT exceptions after logging; signature adaptation removes the known triggers, and the smoke matrix gates on exception count (CI gate candidate)PLAN-supplement.mdandsd/auto_prepare_sd_models.shFollow-ups after merge
release-v1.1.0/release-v1.2.0and branchrelease/release-v1.2.0(triggers the public release pipeline — verifyADI_DEPLOY_TOKENfirst)run_smoke_matrix.shinto test-native as a runtime gate (currently compile-only)