File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 2828 AutoencoderKL ,
2929 UNet2DConditionModel ,
3030)
31+ from diffusers .hooks .group_offloading import apply_group_offloading
3132from diffusers .utils import logging
3233from diffusers .utils .import_utils import is_peft_available
33- from diffusers .hooks .group_offloading import apply_group_offloading
3434
3535from ..testing_utils import (
3636 CaptureLogger ,
@@ -2403,7 +2403,8 @@ def test_lora_group_offloading_delete_adapters(self):
24032403 )
24042404
24052405 pipe .load_lora_weights (tmpdirname , adapter_name = "default" )
2406- pipe (** inputs , generator = torch .manual_seed (0 ))
2406+ out_lora = pipe (** inputs , generator = torch .manual_seed (0 ))[ 0 ]
24072407 # Delete the adapter
24082408 pipe .delete_adapters ("default" )
2409- pipe (** inputs , generator = torch .manual_seed (0 ))
2409+ out_no_lora = pipe (** inputs , generator = torch .manual_seed (0 ))[0 ]
2410+ self .assertFalse (np .allclose (out_lora , out_no_lora , atol = 1e-3 , rtol = 1e-3 ))
You can’t perform that action at this time.
0 commit comments