Skip to content

How to load the structured-pruned sd3-m using SD3Transformer2DModel.from_pretrained? #1

@plustwo0

Description

@plustwo0

Hi, thanks for your great work!

I've tried your unstructured pruning and it turns out really efficient.
However, performing the structured one should reduce param. But when I load it with code below, the memory usage after loading the model remained the same as the original unpruned version (using the code below and without ignore_mismatched_sizes=True it would report a bug)

Is there a way to load the pruned model so that it actually uses less memory?

transformer = SD3Transformer2DModel.from_pretrained(
            args.model_path,
            ignore_mismatched_sizes=True,
            low_cpu_mem_usage=False
            )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions