mirror of
https://github.com/leejet/stable-diffusion.cpp.git
synced 2026-11-11 03:24:30 +00:00
fix: correct encoder channels for flux2 (#1346)
This commit is contained in:
1 parent
862a6586cb
commit
997bb11fb6
1 file changed
+4
-1
@@ -613,6 +613,9 @@ public:
|
|||||||
|
|
||||||
int get_encoder_output_channels() {
|
int get_encoder_output_channels() {
|
||||||
int factor = dd_config.double_z ? 2 : 1;
|
int factor = dd_config.double_z ? 2 : 1;
|
||||||
|
if (sd_version_is_flux2(version)) {
|
||||||
|
return dd_config.z_channels * 4;
|
||||||
|
}
|
||||||
return dd_config.z_channels * factor;
|
return dd_config.z_channels * factor;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -927,4 +930,4 @@ struct AutoEncoderKL : public VAE {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __AUTO_ENCODER_KL_HPP__
|
#endif // __AUTO_ENCODER_KL_HPP__
|
||||||
Reference in new issue
Block a user