Ryan Dick
61d3d566de
Minor cleanup and documentation updates.
2024-09-15 04:39:56 +03:00
Ryan Dick
ae41651346
Remove LoRA conv sidecar layers until they are needed and properly tested.
2024-09-15 04:39:56 +03:00
Ryan Dick
5bb0c79c14
Add links to test models for loha, lokr, ia3.
2024-09-15 04:39:56 +03:00
Ryan Dick
9438ea608c
Update all lycoris layer types to use the new torch.nn.Module base class.
2024-09-15 04:39:56 +03:00
Ryan Dick
81fbaf2b8b
Assume LoRA alpha=8 for FLUX diffusers PEFT LoRAs.
2024-09-15 04:39:56 +03:00
Ryan Dick
10c3c61cb2
Get diffusers FLUX LoRA working as sidecar patch on quantized model.
2024-09-15 04:39:56 +03:00
Ryan Dick
45bc8fcd7f
WIP - Implement sidecar LoRA layers using functional API.
2024-09-15 04:39:56 +03:00
Ryan Dick
f5f894437c
Bug fixes to get LoRA sidecar patching working for the first time.
2024-09-15 04:39:56 +03:00
Ryan Dick
3e12ac9740
WIP - LoRA sidecar layers.
2024-09-15 04:39:56 +03:00
Ryan Dick
049ce1826c
WIP - adding LoRA sidecar layers
2024-09-15 04:39:56 +03:00
Ryan Dick
2ff4dae5ce
Add util functions calc_tensor_size(...) and calc_tensors_size(...).
2024-09-15 04:39:56 +03:00
Ryan Dick
705173b575
Remove unused layer_key property from LoRALayerBase.
2024-09-15 04:39:56 +03:00
Ryan Dick
fef26a5f2f
Consolidate all LoRA patching logic in the LoRAPatcher.
2024-09-15 04:39:56 +03:00
Ryan Dick
ee5d8f6caf
lora_layer_from_state_dict(...) -> any_lora_layer_from_state_dict(...)
2024-09-15 04:39:56 +03:00
Ryan Dick
ddda60c1a2
Rename peft/ -> lora/
2024-09-15 04:39:56 +03:00
Ryan Dick
aac97e105a
Genera cleanup/documentation.
2024-09-15 04:39:56 +03:00
Ryan Dick
552a5b06a4
Add a check that all keys are handled in the FLUX Diffusers LoRA loading code.
2024-09-15 04:39:56 +03:00
Ryan Dick
5800e60b06
Add model probe support for FLUX LoRA models in Diffusers format.
2024-09-15 04:39:56 +03:00
Ryan Dick
31a8757e6b
Add is_state_dict_likely_in_flux_diffusers_format(...) function with unit test.
2024-09-15 04:39:56 +03:00
Ryan Dick
534e938a62
Add unit test for lora_model_from_flux_diffusers_state_dict(...).
2024-09-15 04:39:56 +03:00
Ryan Dick
040cc28f93
First draft of lora_model_from_flux_diffusers_state_dict(...).
2024-09-15 04:39:56 +03:00
Ryan Dick
bb528d916e
Add ConcatenateLoRALayer class.
2024-09-15 04:39:56 +03:00
Ryan Dick
dc09171cdb
WIP on supporting diffusers format FLUX LoRAs.
2024-09-15 04:39:56 +03:00
Ryan Dick
cf9f30cc56
Rename flux_kohya_lora_conversion_utils.py
2024-09-15 04:39:56 +03:00
Ryan Dick
50c9410121
WIP
2024-09-15 04:39:56 +03:00
Ryan Dick
01a15b4d80
WIP - add invocations to support FLUX LORAs.
2024-09-15 04:39:56 +03:00
Ryan Dick
db61ec4322
Get probing of FLUX LoRA kohya models working.
2024-09-15 04:39:56 +03:00
Ryan Dick
00e56863c2
Add utility function for detecting whether a state_dict is in the FLUX kohya LoRA format.
2024-09-15 04:39:56 +03:00
Ryan Dick
7b5befad0d
Update convert_flux_kohya_state_dict_to_invoke_format() to raise an exception if an unexpected key is encountered, and add a corresponding unit test.
2024-09-15 04:39:56 +03:00
Ryan Dick
04b37e64ea
Move the responsibilities of 1) state_dict loading from file, and 2) SDXL lora key conversions, out of LoRAModelRaw and into LoRALoader.
2024-09-15 04:39:56 +03:00
Ryan Dick
8518ae9ccb
Remove unused LoRAModelRaw.name attribute.
2024-09-15 04:39:56 +03:00
Ryan Dick
d0d91eaeec
Fix type errors in sdxl_lora_conversion_utils.py
2024-09-15 04:39:56 +03:00
Ryan Dick
fc380f077f
Start moving SDXL-specific LoRA conversions out of the general-purpose LoRAModelRaw class.
2024-09-15 04:39:56 +03:00
Ryan Dick
ade75b4748
Get convert_flux_kohya_state_dict_to_invoke_format(...) working, with unit tests.
2024-09-15 04:39:56 +03:00
Ryan Dick
c41bd59812
WIP - Initial logic for kohya FLUX LoRA conversion.
2024-09-15 04:39:56 +03:00
Ryan Dick
2b3e4e123d
Split LoRA layer implementations into separate files.
2024-09-12 15:53:30 +00:00
psychedelicious
248e4a81b2
fix(nodes): handle no detected line segments
2024-09-11 08:12:48 -04:00
psychedelicious
b6aba92426
fix(nodes): MLSD needs inputs to be multiples of 64
2024-09-11 08:12:48 -04:00
psychedelicious
4f2fc65257
tidy(nodes): MLSDEdgeDetection -> MLSDDetection
...
It's a line segment detector, not general edge detector.
2024-09-11 08:12:48 -04:00
psychedelicious
ee4c0efbf7
feat(nodes): update pidinet node
...
Human-readable field names.
2024-09-11 08:12:48 -04:00
psychedelicious
a4250e3ff2
feat(nodes): update mlsd node
...
Human-readable field names.
2024-09-11 08:12:48 -04:00
psychedelicious
67a234c1bb
feat(nodes): update content shuffle node
...
- Better field names
2024-09-11 08:12:48 -04:00
psychedelicious
53792fafb3
feat(nodes): add DWOpenposeDetectionInvocation
...
Similar to the existing node, but without any resizing. The backend logic was consolidated and modified so that it the model loading can be managed by the model manager.
The ONNX Runtime `InferenceSession` class was added to the `AnyModel` union to satisfy the type checker.
2024-09-11 08:12:48 -04:00
psychedelicious
615eddea6f
feat(nodes): add PiDiNetEdgeDetectionInvocation
...
Similar to the existing node, but without any resizing and with a revised model loading API that uses the model manager.
All code related to the invocation now lives in the Invoke repo.
2024-09-11 08:12:48 -04:00
psychedelicious
b3d60bd56a
feat(nodes): add NormalMapInvocation
...
Similar to the existing node, but without any resizing and with a revised model loading API that uses the model manager.
All code related to the invocation now lives in the Invoke repo. Unfortunately, this includes a whole git repo for EfficientNet. I believe we could use the package `timm` instead of this, but it's beyond me.
2024-09-11 08:12:48 -04:00
psychedelicious
fd42da5a36
feat(nodes): add MLSDEdgeDetectionInvocation
...
Similar to the existing node, but without any resizing and with a revised model loading API that uses the model manager.
All code related to the invocation now lives in the Invoke repo.
2024-09-11 08:12:48 -04:00
psychedelicious
bc55791db1
feat(nodes): add MediaPipeFaceDetectionInvocation
...
Similar to the existing node, but without any resizing and with a revised model loading API that uses the model manager.
All code related to the invocation now lives in the Invoke repo.
2024-09-11 08:12:48 -04:00
psychedelicious
c5f3297841
feat(nodes): add LineartEdgeDetectionInvocation
...
Similar to the existing node, but without any resizing and with a revised model loading API that uses the model manager.
2024-09-11 08:12:48 -04:00
psychedelicious
cd2c2a7fde
feat(nodes): add LineartAnimeEdgeDetectionInvocation
...
Similar to the existing node, but without any resizing and with a revised model loading API that uses the model manager.
2024-09-11 08:12:48 -04:00
psychedelicious
1cffcc02a5
feat(nodes): add HEDEdgeDetectionInvocation
...
Similar to the existing node, but without any resizing and with a revised model loading API that uses the model manager.
2024-09-11 08:12:48 -04:00