merge dev#4937
Merged
Merged
Conversation
Signed-off-by: Vladimir Mandic <mandic00@live.com>
Signed-off-by: Vladimir Mandic <mandic00@live.com>
Signed-off-by: Vladimir Mandic <mandic00@live.com>
Signed-off-by: Vladimir Mandic <mandic00@live.com>
Signed-off-by: Vladimir Mandic <mandic00@live.com>
Signed-off-by: Vladimir Mandic <mandic00@live.com>
Signed-off-by: Vladimir Mandic <mandic00@live.com>
Signed-off-by: Vladimir Mandic <mandic00@live.com>
Signed-off-by: Vladimir Mandic <mandic00@live.com>
Signed-off-by: Vladimir Mandic <mandic00@live.com>
Signed-off-by: Vladimir Mandic <mandic00@live.com>
Signed-off-by: Vladimir Mandic <mandic00@live.com>
Signed-off-by: Vladimir Mandic <mandic00@live.com>
Signed-off-by: Vladimir Mandic <mandic00@live.com>
Signed-off-by: Vladimir Mandic <mandic00@live.com>
Signed-off-by: Vladimir Mandic <mandic00@live.com>
fix clean ipex install error and community ZIT models covers
Signed-off-by: Vladimir Mandic <mandic00@live.com>
Signed-off-by: Vladimir Mandic <mandic00@live.com>
Frees the name for pipelines/native_transformer. Module covers the full LyCORIS adapter family (LoRA/LoKR/LoHA/OFT/IA3/GLoRA/Norm/Full), not just LoRA.
5 pipeline files + 2 test files. Mechanical substitution. 141/141 adapter tests pass.
Read .safetensors, strip prefix, partition siblings, run optional converter, from_config + load_state_dict + validate, dtype/quant/offload. Per-arch knobs via TransformerSpec(cls, subfolder, prefixes, converter, siblings, acceptable_missing, forbidden_markers). SiblingSpec covers bundled components like Anima's llm_adapter. 36 offline tests.
217-line bespoke loader collapses to a 40-line ANIMA_SPEC in pipelines/anima/__init__.py (Cosmos converter + llm_adapter sibling + Cosmos 1.0 forbidden marker). Drop the class-keyed REGISTRY: Anima and raw Cosmos share CosmosTransformer3DModel but need different specs. Specs pass via explicit native_spec= kwarg; make_default_spec(cls) covers the auto-converter case.
New native_spec=None kwarg. When set and the UNET dropdown points at a .safetensors, dispatches to native_transformer.load (threading allow_quant/dtype/modules_to_not_convert/modules_dtype_dict). Pipelines without a spec stay on cls.from_single_file unchanged.
ErnieImageTransformer2DModel has no from_single_file; selecting an Ernie finetune in the UNET dropdown previously crashed with "is not a valid JSON file" from from_pretrained. Probe of jibMixErnie_v20.safetensors: 409/409 keys overlap with the model state dict after stripping model.diffusion_model., zero missing or unexpected. Spec is the minimum TransformerSpec(cls=...).
The 40-line hand-rolled loader was generic.load_transformer plus a VACE/standard class switch and a hardcoded GGUF rejection. Switch moves to load_wan; GGUF rejection removed (generic handles it via GGUFQuantizationConfig). No native_spec passed: WanTransformer3DModel has a working diffusers converter, so from_single_file via generic stays correct.
…l entry ChronoEdit, HunyuanImage, Kandinsky5, LongCat, Ovis, NucleusMoE, Bria, BriaFibo. Each inherits from_single_file via FromOriginalModelMixin but has no SINGLE_FILE_LOADABLE_CLASSES entry; calling it crashed with "FromOriginalModelMixin is currently only compatible with [...]". TransformerSpec(cls=...) for each. Bria specs in pipelines/bria/__init__.py; the rest are module-level in model_<arch>.py since they have no package directory.
Signed-off-by: Vladimir Mandic <mandic00@live.com>
Signed-off-by: Vladimir Mandic <mandic00@live.com>
… var The VideoCapture is stored in cap, but the per-frame read and skip/yield guards referenced video, which is set to None at function entry and never reassigned. As a result only the first frame of a video input was processed. Co-Authored-By: Claude <noreply@anthropic.com>
…ad no-LoRA guard make_lora reassigned the 'modules' selection arg to a named_modules() generator, so the subsequent 'te'/'unet' in modules checks tested an exhausted generator and silently skipped TE2 + UNet extraction. Also 'loaded_lora() == ""' never matched a loaded model (returns a list), so the no-LoRA-detected guard never fired. Co-Authored-By: Claude <noreply@anthropic.com>
…d, raw allowed path
generate.py: p.ip_adapter_masks was reinitialized inside the per-adapter loop, discarding all but the last adapter's masks; move it beside the other accumulators. process.py: req.params is dict|None, so a null params body crashed .items() in post_preprocess/post_mask. api.py: split(':') without maxsplit broke auth/auth-file entries whose password contains a colon. gallery.py: allowed_paths stored quote(path) but the membership check and path guards use the raw path, causing duplicate accumulation and an ineffective whitelist; also drop the unused FastAPI import (pylint W0611 surfaced when this file is linted).
Co-Authored-By: Claude <noreply@anthropic.com>
…t pipeline before use sd_hijack_accelerate.py: bias.to(weight.dtype) discarded its result (Tensor.to is not in-place), so the conv still received the mismatched bias. sd_hijack_te.py: os.environ.get returns a str when MAX_SEQUENCE_LENGTH is set, so max(int, str) raised TypeError (uncaught, before the try); coerce with int(). sd_detect.py: pipeline was referenced in 'if callable(pipeline)' but only assigned when cls is not None, raising UnboundLocalError for a model_index.json without _class_name. Co-Authored-By: Claude <noreply@anthropic.com>
…utput-block fall-through api_list_models omitted the 'or model_type == all' clause for zimage, so ZImage ControlNets never appeared in the all listing - added it to match every other family. lite_model used pass for the unimplemented root==output branch, which fell through to b = getattr(b, attn_name) with b unbound or stale from a prior iteration (UnboundLocalError or wrong-block patch); use continue to skip it. Co-Authored-By: Claude <noreply@anthropic.com>
hr_upscale_to_x is the width dimension and hr_upscale_to_y the height (see processing_class.py); set_resolution assigned them transposed, producing swapped HyperTile geometry on non-square hires passes. Co-Authored-By: Claude <noreply@anthropic.com>
NetworkModule.__init__ set self.shape only inside 'if hasattr(sd_module, weight)' but then used len(self.shape) unconditionally, raising AttributeError when a LoRA targets a weightless module. Default shape to None and skip the dora_norm_dims computation when absent. Co-Authored-By: Claude <noreply@anthropic.com>
fix(control): advance video frames via cap, not the always-None video var
…election fix(lora-extract): stop overwriting the module selection list; fix dead no-LoRA guard
fix(api): IP-adapter mask accumulation, null params, colon-in-password, raw allowed path
fix(runtime): capture bias dtype cast, coerce env seq-len to int, init pipeline before use
fix(control-units): list zimage controlnets under 'all'; fix LLLite output-block fall-through
fix(hypertile): correct width/height mapping in hires set_resolution
Signed-off-by: Vladimir Mandic <mandic00@live.com>
fix(lora): guard self.shape for modules without a weight attribute
…ntain permissions' Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
UpscalerSeedVR.load_model() rebinds the module-global generation.generation_step (called by name inside generation_loop) to the instance's model_step wrapper, keeping the previous value to call back into. That global was never restored, so the second pass through load_model() saved the wrapper itself as the "original", making model_step() call itself -> RecursionError. The second pass is reached on any model (re)load: with upscaler_unload enabled (self.model reset to None after each run) every subsequent run recurses, and switching SeedVR variants (self.model_loaded != model_name) triggers it even without unload. Stash the pristine generation_step on the module once and have the wrapper call that, so repeated loads never wrap the wrapper. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Vladimir Mandic <mandic00@live.com>
Signed-off-by: Vladimir Mandic <mandic00@live.com>
Signed-off-by: Vladimir Mandic <mandic00@live.com>
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.
No description provided.