@@ -796,8 +796,8 @@ def test_modify_padding_mode(self):
796796@nightly  
797797@require_torch_gpu  
798798@require_peft_backend  
799- @unittest . skip ( "We cannot run inference on this model with the current CI hardware" )  
800- # TODO (DN6, sayakpaul): move these tests to a beefier GPU 
799+ @require_big_gpu_with_torch_cuda  
800+ @ pytest . mark . big_gpu_with_torch_cuda 
801801class  FluxLoRAIntegrationTests (unittest .TestCase ):
802802    """internal note: The integration slices were obtained on audace. 
803803
@@ -819,14 +819,18 @@ def setUp(self):
819819    def  tearDown (self ):
820820        super ().tearDown ()
821821
822+         del  self .pipeline 
822823        gc .collect ()
823824        torch .cuda .empty_cache ()
824825
825826    def  test_flux_the_last_ben (self ):
826827        self .pipeline .load_lora_weights ("TheLastBen/Jon_Snow_Flux_LoRA" , weight_name = "jon_snow.safetensors" )
827828        self .pipeline .fuse_lora ()
828829        self .pipeline .unload_lora_weights ()
829-         self .pipeline .enable_model_cpu_offload ()
830+         # Instead of calling `enable_model_cpu_offload()`, we do a cuda placement here because the CI 
831+         # run supports it. We have about 34GB RAM in the CI runner which kills the test when run with 
832+         # `enable_model_cpu_offload()`. We repeat this for the other tests, too. 
833+         self .pipeline  =  self .pipeline .to (torch_device )
830834
831835        prompt  =  "jon snow eating pizza with ketchup" 
832836
@@ -848,7 +852,7 @@ def test_flux_kohya(self):
848852        self .pipeline .load_lora_weights ("Norod78/brain-slug-flux" )
849853        self .pipeline .fuse_lora ()
850854        self .pipeline .unload_lora_weights ()
851-         self .pipeline . enable_model_cpu_offload ( )
855+         self .pipeline   =   self . pipeline . to ( torch_device )
852856
853857        prompt  =  "The cat with a brain slug earring" 
854858        out  =  self .pipeline (
@@ -870,7 +874,7 @@ def test_flux_kohya_with_text_encoder(self):
870874        self .pipeline .load_lora_weights ("cocktailpeanut/optimus" , weight_name = "optimus.safetensors" )
871875        self .pipeline .fuse_lora ()
872876        self .pipeline .unload_lora_weights ()
873-         self .pipeline . enable_model_cpu_offload ( )
877+         self .pipeline   =   self . pipeline . to ( torch_device )
874878
875879        prompt  =  "optimus is cleaning the house with broomstick" 
876880        out  =  self .pipeline (
@@ -892,7 +896,7 @@ def test_flux_xlabs(self):
892896        self .pipeline .load_lora_weights ("XLabs-AI/flux-lora-collection" , weight_name = "disney_lora.safetensors" )
893897        self .pipeline .fuse_lora ()
894898        self .pipeline .unload_lora_weights ()
895-         self .pipeline . enable_model_cpu_offload ( )
899+         self .pipeline   =   self . pipeline . to ( torch_device )
896900
897901        prompt  =  "A blue jay standing on a large basket of rainbow macarons, disney style" 
898902
0 commit comments