MPDynamic: force load flux img_in weight (Fixes flux1 canny+depth lora crash) (#12446)

* lora: add weight shape calculations.

This lets the loader know if a lora will change the shape of a weight
so it can take appropriate action.

* MPDynamic: force load flux img_in weight

This weight is a bit special, in that the lora changes its geometry.
This is rather unique, not handled by existing estimate and doesn't
work for either offloading or dynamic_vram.

Fix for dynamic_vram as a special case. Ideally we can fully precalculate
these lora geometry changes at load time, but just get these models
working first.
This commit is contained in:
rattus
2026-02-15 17:30:09 -08:00
committed by GitHub
parent ecd2a19661
commit c0370044cd
4 changed files with 65 additions and 8 deletions
+7
View File
@@ -214,6 +214,13 @@ class LoRAAdapter(WeightAdapterBase):
else:
return None
def calculate_shape(
self,
key
):
reshape = self.weights[5]
return tuple(reshape) if reshape is not None else None
def calculate_weight(
self,
weight,