Skip to content

Commit 2458119

Browse files
sayakpaulhari10599
authored andcommitted
fix: deepseepd_plugin retrieval from accelerate state (huggingface#3410)
1 parent 137a7a3 commit 2458119

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/text_to_image/train_text_to_image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ def deepspeed_zero_init_disabled_context_manager():
471471
"""
472472
returns either a context list that includes one that will disable zero.Init or an empty context list
473473
"""
474-
deepspeed_plugin = AcceleratorState() if accelerate.state.is_initialized() else None
474+
deepspeed_plugin = AcceleratorState().deepspeed_plugin if accelerate.state.is_initialized() else None
475475
if deepspeed_plugin is None:
476476
return []
477477

0 commit comments

Comments
 (0)