Skip to content

How to use quantizer after pipeline loaded? #12823

@DefTruth

Description

@DefTruth

How to use quantizer after pipeline loaded?

  • Currently
# Quantization occurs at load time.
pipe = QwenImagePipeline.from_pretrained(
    (
        args.model_path
        if args.model_path is not None
        else os.environ.get(
            "QWEN_IMAGE_DIR",
            "Qwen/Qwen-Image",
        )
    ),
    scheduler=scheduler,
    torch_dtype=torch.bfloat16,
    quantization_config=quantization_config,
)
  • What i want
# Load on CPU -> Load and fuse lora -> quantize -> to GPU

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions