1
mirror of https://github.com/comfyanonymous/ComfyUI.git synced 2025-08-03 07:26:31 +08:00

Basic Flux Schnell and Flux Dev model implementation.

This commit is contained in:
comfyanonymous
2024-08-01 04:03:59 -04:00
parent 7ad574bffd
commit 1589b58d3e
12 changed files with 624 additions and 3 deletions

View File

@@ -139,3 +139,14 @@ class SD3(LatentFormat):
class StableAudio1(LatentFormat):
latent_channels = 64
class Flux(SD3):
def __init__(self):
self.scale_factor = 0.3611
self.shift_factor = 0.1159
def process_in(self, latent):
return (latent - self.shift_factor) * self.scale_factor
def process_out(self, latent):
return (latent / self.scale_factor) + self.shift_factor