Skip to content

Commit c31128b

Browse files
committed
patch size consistent with Flux1
1 parent d6d5a68 commit c31128b

File tree

3 files changed

+3
-13
lines changed

3 files changed

+3
-13
lines changed

flux.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1250,7 +1250,6 @@ namespace Flux {
12501250
} else if (sd_version_is_longcat(version)) {
12511251
flux_params.context_in_dim = 3584;
12521252
flux_params.vec_in_dim = 0;
1253-
flux_params.patch_size = 1;
12541253
}
12551254
for (auto pair : tensor_storage_map) {
12561255
std::string tensor_name = pair.first;

stable-diffusion.cpp

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1346,12 +1346,6 @@ class StableDiffusionGGML {
13461346
latent_rgb_bias = flux2_latent_rgb_bias;
13471347
patch_sz = 2;
13481348
}
1349-
} else if (dim == 64) {
1350-
if (sd_version_is_flux(version) || sd_version_is_z_image(version) || sd_version_is_longcat(version)) {
1351-
latent_rgb_proj = flux_latent_rgb_proj;
1352-
latent_rgb_bias = flux_latent_rgb_bias;
1353-
patch_sz = 2;
1354-
}
13551349
} else if (dim == 48) {
13561350
if (sd_version_is_wan(version)) {
13571351
latent_rgb_proj = wan_22_latent_rgb_proj;
@@ -1921,7 +1915,7 @@ class StableDiffusionGGML {
19211915
int vae_scale_factor = 8;
19221916
if (version == VERSION_WAN2_2_TI2V) {
19231917
vae_scale_factor = 16;
1924-
} else if (sd_version_is_flux2(version) || sd_version_is_longcat(version)) {
1918+
} else if (sd_version_is_flux2(version)) {
19251919
vae_scale_factor = 16;
19261920
} else if (version == VERSION_CHROMA_RADIANCE) {
19271921
vae_scale_factor = 1;
@@ -1938,8 +1932,6 @@ class StableDiffusionGGML {
19381932
latent_channel = 3;
19391933
} else if (sd_version_is_flux2(version)) {
19401934
latent_channel = 128;
1941-
} else if (sd_version_is_longcat(version)) {
1942-
latent_channel = 64;
19431935
} else {
19441936
latent_channel = 16;
19451937
}
@@ -2240,7 +2232,6 @@ class StableDiffusionGGML {
22402232
sd_version_is_qwen_image(version) ||
22412233
sd_version_is_wan(version) ||
22422234
sd_version_is_flux2(version) ||
2243-
sd_version_is_longcat(version) ||
22442235
version == VERSION_CHROMA_RADIANCE) {
22452236
latent = vae_output;
22462237
} else if (version == VERSION_SD1_PIX2PIX) {

vae.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ class AutoencodingEngine : public GGMLBlock {
553553

554554
struct ggml_tensor* decode(GGMLRunnerContext* ctx, struct ggml_tensor* z) {
555555
// z: [N, z_channels, h, w]
556-
if (sd_version_is_flux2(version) || sd_version_is_longcat(version)) {
556+
if (sd_version_is_flux2(version)) {
557557
// [N, C*p*p, h, w] -> [N, C, h*p, w*p]
558558
int64_t p = 2;
559559

@@ -592,7 +592,7 @@ class AutoencodingEngine : public GGMLBlock {
592592
auto quant_conv = std::dynamic_pointer_cast<Conv2d>(blocks["quant_conv"]);
593593
z = quant_conv->forward(ctx, z); // [N, 2*embed_dim, h/8, w/8]
594594
}
595-
if (sd_version_is_flux2(version) || sd_version_is_longcat(version)) {
595+
if (sd_version_is_flux2(version)) {
596596
z = ggml_ext_chunk(ctx->ggml_ctx, z, 2, 2)[0];
597597

598598
// [N, C, H, W] -> [N, C*p*p, H/p, W/p]

0 commit comments

Comments
 (0)