Ryan Dick
|
dd09509dbd
|
Rename ModelPatcher -> LayerPatcher to avoid conflicts with another ModelPatcher definition.
|
2024-12-17 13:20:19 +00:00 |
|
Ryan Dick
|
7fad4c9491
|
Rename LoRAModelRaw to ModelPatchRaw.
|
2024-12-17 13:20:19 +00:00 |
|
Ryan Dick
|
b820862eab
|
Rename ModelPatcher methods to reflect that they are general model patching methods and are not LoRA-specific.
|
2024-12-17 13:20:19 +00:00 |
|
Ryan Dick
|
c604a0956e
|
Rename LoRAPatcher -> ModelPatcher.
|
2024-12-17 13:20:19 +00:00 |
|
Ryan Dick
|
9369b39a12
|
Add GGMLTensor op.
|
2024-12-17 13:20:19 +00:00 |
|
Ryan Dick
|
80f64abd1e
|
Use a FluxControlLoRALayer when loading FLUX control LoRAs.
|
2024-12-17 13:20:19 +00:00 |
|
Ryan Dick
|
37e3089457
|
Push LoRA layer reshaping down into the patch layers and add a new FluxControlLoRALayer type.
|
2024-12-17 13:20:19 +00:00 |
|
Ryan Dick
|
fe09f2d27a
|
Move handling of LoRA scale and patch weight down into the layer patch classes.
|
2024-12-17 13:20:19 +00:00 |
|
Ryan Dick
|
e7e3f7e144
|
Ensure that patches are on the correct device when used in sidecar wrappers.
|
2024-12-17 13:20:19 +00:00 |
|
Ryan Dick
|
606d58d7db
|
Add sidecar wrapper for FLUX RMSNorm layers to support SetParameterLayers used by FLUX structural control LoRAs.
|
2024-12-17 13:20:19 +00:00 |
|
Ryan Dick
|
c76a448846
|
Delete old sidecar_layers/ dir.
|
2024-12-17 13:20:19 +00:00 |
|
Ryan Dick
|
46133b5656
|
Switch LoRAPatcher to use the new sidecar_wrappers/ rather than sidecar_layers/.
|
2024-12-17 13:20:19 +00:00 |
|
Ryan Dick
|
ac28370fd2
|
Break up functions in LoRAPatcher in preparation for more refactoring.
|
2024-12-17 13:20:19 +00:00 |
|
Ryan Dick
|
1e0552c813
|
Add optimized implementations for the LinearSidecarWrapper when using LoRALayer or ConcatenatedLoRALayer patch types (since these are the most common).
|
2024-12-17 13:20:19 +00:00 |
|
Ryan Dick
|
e2451ef5ca
|
A unit tests for LinearSidecarWrapper (and fix a bug).
|
2024-12-17 13:20:19 +00:00 |
|
Ryan Dick
|
443d838fd0
|
Add initial basic implementation of sidecar wrappers.
|
2024-12-17 13:20:19 +00:00 |
|
Ryan Dick
|
808e3770d3
|
Remove AnyLoRALayer type definition in favor of using BaseLayerPatch base class.
|
2024-12-17 13:20:19 +00:00 |
|
Ryan Dick
|
2b441d6a2d
|
Add BaseLayerPatch ABC to clarify the intended patch interface.
|
2024-12-17 13:20:19 +00:00 |
|
Ryan Dick
|
58de93a89e
|
Delete empty file.
|
2024-12-17 13:20:19 +00:00 |
|
Ryan Dick
|
1eede4315e
|
Delete ONNXModelPatcher. It is outdated and hasn't been used for a long time.
|
2024-12-17 13:20:19 +00:00 |
|
Ryan Dick
|
8ea697d733
|
Mark LoRALayerBase.rank(...) as a private method.
|
2024-12-17 13:20:19 +00:00 |
|
Ryan Dick
|
693d42661c
|
Add basic unit tests for LoRALayer.
|
2024-12-17 13:20:19 +00:00 |
|
Ryan Dick
|
41664f88db
|
Rename backend/patches/conversions/ to backend/patches/lora_conversions/
|
2024-12-17 13:20:19 +00:00 |
|
Ryan Dick
|
42f8d6aa11
|
Rename backend/lora/ to backend/patches
|
2024-12-17 13:20:19 +00:00 |
|
Ryan Dick
|
7da90a9b6b
|
Ensure that model probe does not crash with integer state dict keys.
|
2024-12-17 07:28:45 -05:00 |
|
Ryan Dick
|
440185cc40
|
Simplify FLUX control LoRA probing.
|
2024-12-17 07:28:45 -05:00 |
|
Ryan Dick
|
26edc71268
|
ruff format
|
2024-12-17 07:28:45 -05:00 |
|
Ryan Dick
|
a4bed7aee3
|
Minor tidy of FLUX control LoRA implementation. (mostly documentation)
|
2024-12-17 07:28:45 -05:00 |
|
Ryan Dick
|
d84adfd39f
|
Clean up FLUX control LoRA pre-processing logic.
|
2024-12-17 07:28:45 -05:00 |
|
Brandon Rising
|
70811d0bd0
|
Remove unexpected artifacts in output images
|
2024-12-17 07:28:45 -05:00 |
|
Mary Hipp
|
da213e4638
|
feat(ui): add control loras to control adapter model options, add default settings for preprocessor in probe
|
2024-12-17 07:28:45 -05:00 |
|
Brandon Rising
|
046d19446c
|
Rename Structural Lora to Control Lora
|
2024-12-17 07:28:45 -05:00 |
|
Ryan Dick
|
040551d4fb
|
Fixes to get FLUX Control LoRA working.
|
2024-12-17 07:28:45 -05:00 |
|
Brandon Rising
|
f53da60b84
|
Lots of updates centered around using the lora patcher rather than changing the modules in the transformer model
|
2024-12-17 07:28:45 -05:00 |
|
Brandon Rising
|
5a035dd19f
|
Support bnb quantized nf4 flux models, Use controlnet vae, only support 1 structural lora per transformer. various other refractors and bugfixes
|
2024-12-17 07:28:45 -05:00 |
|
Brandon Rising
|
f3b253987f
|
Initial setup for flux tools control loras
|
2024-12-17 07:28:45 -05:00 |
|
Ryan Dick
|
0bff4ace1b
|
Revert performance improvement, because it caused flux inference to fail on Mac: https://github.com/invoke-ai/InvokeAI/issues/7422
|
2024-12-03 15:18:58 +00:00 |
|
Jonathan
|
c094838c6a
|
Update model_util.py
|
2024-12-02 14:35:02 -08:00 |
|
Ryan Dick
|
021552fd81
|
Avoid unnecessary dtype conversions with rope encodings.
|
2024-11-29 12:32:50 -05:00 |
|
Ryan Dick
|
be73dbba92
|
Use view() instead of rearrange() for better performance.
|
2024-11-29 12:32:50 -05:00 |
|
Ryan Dick
|
db9c0cad7c
|
Replace custom RMSNorm implementation with torch.nn.functional.rms_norm(...) for improved speed.
|
2024-11-29 12:32:50 -05:00 |
|
psychedelicious
|
5910892c33
|
Merge remote-tracking branch 'origin/main' into ryan/flux-regional-prompting
|
2024-11-29 15:19:39 +10:00 |
|
Ryan Dick
|
5d8dd6e26e
|
Fix FLUX regional negative prompts.
|
2024-11-28 18:49:29 +00:00 |
|
Ryan Dick
|
64364e7911
|
Short-circuit if there are no region masks in FLUX and don't apply attention masking.
|
2024-11-27 22:40:10 +00:00 |
|
Ryan Dick
|
6565cea039
|
Comment unused _prepare_unrestricted_attn_mask(...) for future reference.
|
2024-11-27 22:16:44 +00:00 |
|
Ryan Dick
|
3ebd8d6c07
|
Delete outdated TODO comment.
|
2024-11-27 22:13:25 +00:00 |
|
Ryan Dick
|
e970185161
|
Tweak flux regional prompting attention scheme based on latest experimentation.
|
2024-11-27 22:13:07 +00:00 |
|
Brandon Rising
|
ed46acee79
|
fix: Fail scan on InvalidMagicError in picklescan, update default for read_checkpoint_meta to scan unless explicitly told not to
|
2024-11-26 16:17:12 -05:00 |
|
Ryan Dick
|
b54463d294
|
Allow regional prompting background regions to attend to themselves and to the entire txt embedding.
|
2024-11-26 17:57:31 +00:00 |
|
Ryan Dick
|
faee79dc95
|
Distinguish between restricted and unrestricted attn masks in FLUX regional prompting.
|
2024-11-26 16:55:52 +00:00 |
|