We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 72d76a8 commit e75ef18Copy full SHA for e75ef18
1 file changed
src/diffusers/hooks/group_offloading.py
@@ -82,7 +82,8 @@ def __init__(
82
self._is_offloaded_to_disk = False
83
84
if self.offload_to_disk_path:
85
- self.group_id = group_id or id(self)
+ # Instead of `group_id or str(id(self))` we do this because `group_id` can be "" as well.
86
+ self.group_id = group_id if group_id is not None else str(id(self))
87
short_hash = _compute_group_hash(self.group_id)
88
self.safetensors_file_path = os.path.join(self.offload_to_disk_path, f"group_{short_hash}.safetensors")
89
0 commit comments