Closed dasayan05 closed 8 months ago
Sorry, we are hydra users in the team and don't have enough expertise for you here.
Adding _convert_: all
could resolve the same issue in my project.
for example:
model:
_target_: diffusers.models.UNet2DModel
_convert_: all
...
see also: https://hydra.cc/docs/1.1/advanced/instantiate_objects/overview/
Describe the bug
When using
hydra
to configure diffusers model instances, it fails to serialize (i.e..save_config()
). This is very similar to #3814 but the solution isn't really applicable to me.Reason for this behavior:
diffusers
' sFrozenDict
apparently doesn't take care of list/tuple arguments recursively.PS: I am not sure if this issue belongs here, but still would like to see if someone has a solution.
Reproduction
I am trying to configure the
UNet2DModel
class using hydra's automatic instantiation mechanism, where I have the following configNow instantiate the model following the
hydra
way.. and it works fine so far.
BUT, turns out that the
FrozenDict
that wraps over the internal config dictionary .... still contains some
hydra
-container inside, which is not serializable.. and makes the
.save_config()
(and eventually.save_pretrained()
) to failLogs
No response
System Info
diffusers
version: 0.25.1Who can help?
@sayakpaul @patrickvonplaten