ComfyUI_ExtraModels icon indicating copy to clipboard operation
ComfyUI_ExtraModels copied to clipboard

Feat: add dtype selection to PixArt

Open SLAPaper opened this issue 1 year ago • 5 comments

add dtype selection to pixart loading so that it won't conflicting with fp8 mode of ComfyUI, which is incompatible with pixart models mentioned in #9

SLAPaper avatar Jan 26 '24 20:01 SLAPaper

type annotations removed

SLAPaper avatar Jan 26 '24 23:01 SLAPaper

Thanks, looks good now.

I thought about it more and I might be able to get FP8 support working for just the PixArt model. I'll take a shot at it tonight or tomorrow, then merge this if that doesn't pan out.

city96 avatar Jan 27 '24 17:01 city96

Alright, I got started on proper FP8 support on this branch. I think it's doable, though I don't have much free time these days.

In the meantime I just added a quick workaround so the current code still works when launched with --fp8_e5m2-unet - it'll just falls back to fp16 or whatever the default dtype is. Can you test if this works for you?

city96 avatar Jan 28 '24 16:01 city96

Fine, I'll test it afterwards

SLAPaper avatar Jan 29 '24 08:01 SLAPaper

The quick fix works fine, thanks!

SLAPaper avatar Jan 29 '24 16:01 SLAPaper