Unverified Commit bc0392a0 authored by YiYi Xu's avatar YiYi Xu Committed by GitHub
Browse files

make `from_flax` work for controlnet (#3161)



fix from_flax
Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
parent 05d9baea
...@@ -110,6 +110,12 @@ def load_flax_weights_in_pytorch_model(pt_model, flax_state): ...@@ -110,6 +110,12 @@ def load_flax_weights_in_pytorch_model(pt_model, flax_state):
.replace("_1", ".1") .replace("_1", ".1")
.replace("_2", ".2") .replace("_2", ".2")
.replace("_3", ".3") .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) flax_key = ".".join(flax_key_tuple_array)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment