Skip to content

Can diffusers support loading and running FLUX with fp8 ? #11580

Open
@EmmaThompson123

Description

@EmmaThompson123

This is how I use diffusers to load flux model:

import torch
from diffusers import FluxPipeline
pipe = FluxPipeline.from_pretrained(
    "/ckptstorage/repo/pretrained_weights/black-forest-labs/FLUX.1-dev", 
    torch_dtype=torch.float16,
)
device = torch.device(f"cuda:{device_number}" if torch.cuda.is_available() else "cpu")
pipe = pipe.to(device)

it consumes about 75 seconds on my computer with A800 GPU.
But I found in comfyui, it only need 22 seconds to load flux model, but it load the fp8 model.
Can diffusers load flux fp8 model ?
or is there any other speed up method ?

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