Skip to content

Conversation

@andompesta
Copy link

this PR aims at solving some bug related to FP8 such as:

  • scaling factor allocation to the correct device
  • adding support for casting to QuantizeTensor
  • proper Fp8 scaling factor implementation
  • enable FP8 mixedprecision for text-encoders

scale = scale.to(device=tensor.device, dtype=torch.float32)

tensor_scaled = tensor * (1.0 / scale).to(tensor.dtype)
tensor_fp32 = tensor.to(torch.float32)
Copy link
Owner

Choose a reason for hiding this comment

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

casting to fp32 here causes some pretty large slowdowns that make the fp8 ops as slow as 16 bit.

@Kosinkadink
Copy link
Collaborator

comfy modified this PR in #10872 and merged it in, so closing this PR

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.

3 participants