Open christopher-beckham opened 1 month ago
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.
Please note that issues that do not follow the contributing guidelines are likely to be ignored.
Hi,
In the FSDP docs it says:
In
diffusers
(I can't speak fortransformers
), for anything which implements theModelMixin
class the methodsave_pretrained
actually doesn't support passing in a custom state dict. Whilesave_pretrained
does take**kwargs
it specifically is for kwargs to be passed intopush_to_hub
:https://github.com/huggingface/diffusers/blob/8cdcdd9e32925200ce5e1cf410fe14a774f3c3a6/src/diffusers/models/modeling_utils.py#L266-L275
It is probably worth modifying the readme to say that in the case of
diffusers
you might be better off doing something like:i.e., we have to be a bit hacky and save the state dict ourselves as long as the config file. (There may be a more optimal solution but I'm not a wizard at this.)
Any thoughts? Thanks.