Skip to content

Commit e5089d7

Browse files
committed
update
1 parent 2c3e4ea commit e5089d7

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/diffusers/pipelines/components_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ def get(self, names: Union[str, List[str]]):
266266
else:
267267
raise ValueError(f"Invalid type for names: {type(names)}")
268268

269-
def enable_auto_cpu_offload(self, device, memory_reserve_margin="3GB"):
269+
def enable_auto_cpu_offload(self, device: Union[str, int, torch.device]="cuda", memory_reserve_margin="3GB"):
270270
for name, component in self.components.items():
271271
if isinstance(component, torch.nn.Module) and hasattr(component, "_hf_hook"):
272272
remove_hook_from_module(component, recurse=True)

src/diffusers/pipelines/stable_diffusion_xl/pipeline_stable_diffusion_xl_modular.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3020,6 +3020,11 @@ def description(self):
30203020
("decode", StableDiffusionXLAutoDecodeStep)
30213021
])
30223022

3023+
AUTO_CORE_BLOCKS = OrderedDict([
3024+
("before_denoise", StableDiffusionXLAutoBeforeDenoiseStep),
3025+
("denoise", StableDiffusionXLAutoDenoiseStep),
3026+
])
3027+
30233028

30243029
SDXL_SUPPORTED_BLOCKS = {
30253030
"text2img": TEXT2IMAGE_BLOCKS,

0 commit comments

Comments
 (0)