mirror of
https://github.com/huggingface/diffusers.git
synced 2026-01-27 17:22:53 +03:00
make from_flax work for controlnet (#3161)
fix from_flax Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
This commit is contained in:
@@ -110,6 +110,12 @@ def load_flax_weights_in_pytorch_model(pt_model, flax_state):
|
||||
.replace("_1", ".1")
|
||||
.replace("_2", ".2")
|
||||
.replace("_3", ".3")
|
||||
.replace("_4", ".4")
|
||||
.replace("_5", ".5")
|
||||
.replace("_6", ".6")
|
||||
.replace("_7", ".7")
|
||||
.replace("_8", ".8")
|
||||
.replace("_9", ".9")
|
||||
)
|
||||
|
||||
flax_key = ".".join(flax_key_tuple_array)
|
||||
|
||||
Reference in New Issue
Block a user