mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2026-01-31 04:42:09 -08:00
add cheap approximation for flux
This commit is contained in:
parent
9e57c722b2
commit
789bfc7db4
1 changed files with 14 additions and 0 deletions
|
|
@ -44,6 +44,8 @@ def model():
|
|||
model_name = "vaeapprox-sd3.pt"
|
||||
elif shared.sd_model.is_sdxl:
|
||||
model_name = "vaeapprox-sdxl.pt"
|
||||
elif shared.sd_model.is_flux1:
|
||||
model_name = "vaeapprox-sd3.pt"
|
||||
else:
|
||||
model_name = "model.pt"
|
||||
|
||||
|
|
@ -81,6 +83,18 @@ def cheap_approximation(sample):
|
|||
[ 0.0815, 0.0846, 0.1207], [-0.0120, -0.0055, -0.0867],
|
||||
[-0.0749, -0.0634, -0.0456], [-0.1418, -0.1457, -0.1259],
|
||||
]
|
||||
elif shared.sd_model.is_flux1:
|
||||
coeffs = [
|
||||
# from comfy
|
||||
[-0.0404, 0.0159, 0.0609], [ 0.0043, 0.0298, 0.0850],
|
||||
[ 0.0328, -0.0749, -0.0503], [-0.0245, 0.0085, 0.0549],
|
||||
[ 0.0966, 0.0894, 0.0530], [ 0.0035, 0.0399, 0.0123],
|
||||
[ 0.0583, 0.1184, 0.1262], [-0.0191, -0.0206, -0.0306],
|
||||
[-0.0324, 0.0055, 0.1001], [ 0.0955, 0.0659, -0.0545],
|
||||
[-0.0504, 0.0231, -0.0013], [ 0.0500, -0.0008, -0.0088],
|
||||
[ 0.0982, 0.0941, 0.0976], [-0.1233, -0.0280, -0.0897],
|
||||
[-0.0005, -0.0530, -0.0020], [-0.1273, -0.0932, -0.0680],
|
||||
]
|
||||
elif shared.sd_model.is_sdxl:
|
||||
coeffs = [
|
||||
[ 0.3448, 0.4168, 0.4395],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue