File tree Expand file tree Collapse file tree 4 files changed +12
-0
lines changed
Expand file tree Collapse file tree 4 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -238,6 +238,9 @@ def test_attention_slicing_forward_pass(
238238 return
239239
240240 components = self .get_dummy_components ()
241+ for key in components :
242+ if "text_encoder" in key and hasattr (components [key ], "eval" ):
243+ components [key ].eval ()
241244 pipe = self .pipeline_class (** components )
242245 for component in pipe .components .values ():
243246 if hasattr (component , "set_default_attn_processor" ):
Original file line number Diff line number Diff line change @@ -249,6 +249,9 @@ def test_attention_slicing_forward_pass(
249249 return
250250
251251 components = self .get_dummy_components ()
252+ for key in components :
253+ if "text_encoder" in key and hasattr (components [key ], "eval" ):
254+ components [key ].eval ()
252255 pipe = self .pipeline_class (** components )
253256 for component in pipe .components .values ():
254257 if hasattr (component , "set_default_attn_processor" ):
Original file line number Diff line number Diff line change @@ -233,6 +233,9 @@ def test_attention_slicing_forward_pass(
233233 return
234234
235235 components = self .get_dummy_components ()
236+ for key in components :
237+ if "text_encoder" in key and hasattr (components [key ], "eval" ):
238+ components [key ].eval ()
236239 pipe = self .pipeline_class (** components )
237240 for component in pipe .components .values ():
238241 if hasattr (component , "set_default_attn_processor" ):
Original file line number Diff line number Diff line change @@ -246,6 +246,9 @@ def test_attention_slicing_forward_pass(
246246 return
247247
248248 components = self .get_dummy_components ()
249+ for key in components :
250+ if "text_encoder" in key and hasattr (components [key ], "eval" ):
251+ components [key ].eval ()
249252 pipe = self .pipeline_class (** components )
250253 for component in pipe .components .values ():
251254 if hasattr (component , "set_default_attn_processor" ):
You can’t perform that action at this time.
0 commit comments