Skip to content

Conversation

yao-matrix
Copy link
Contributor

to make below 4 cases pass on XPU

pytest -rA tests/modular_pipelines/stable_diffusion_xl/test_modular_pipeline_stable_diffusion_xl.py::SDXLImg2ImgModularPipelineFastTests::test_components_auto_cpu_offload_inference_consistent
pytest -rA tests/modular_pipelines/stable_diffusion_xl/test_modular_pipeline_stable_diffusion_xl.py::SDXLInpaintingModularPipelineFastTests::test_components_auto_cpu_offload_inference_consistent
pytest -rA tests/modular_pipelines/stable_diffusion_xl/test_modular_pipeline_stable_diffusion_xl.py::SDXLModularPipelineFastTests::test_components_auto_cpu_offload_inference_consistent
pytest -rA tests/lora/test_lora_layers_hunyuanvideo.py::HunyuanVideoLoRAIntegrationTests::test_original_format_cseti

@DN6 @a-r-r-o-w , pls help review, thx very much

Signed-off-by: Yao, Matrix <matrix.yao@intel.com>
@@ -678,7 +683,7 @@ def matches_pattern(component_id, pattern, exact_match=False):

return get_return_dict(matches, return_dict_with_names)

def enable_auto_cpu_offload(self, device: Union[str, int, torch.device] = "cuda", memory_reserve_margin="3GB"):
def enable_auto_cpu_offload(self, device: Union[str, int, torch.device] = None, memory_reserve_margin="3GB"):
"""
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as in #11288, i suggest make None as the default value of device, so in that case, if users run on other devices like XPU w/o specify the device argument, the code will auto detect the device and run, rather than crash. Thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant