Compare commits

..

No commits in common. "c9cd49701a91cb10a07f07512d1bb5b966f05c6e" and "636d3cb6ff25d1ffa7267e5f6dac9f2925945606" have entirely different histories.

2 changed files with 7 additions and 15 deletions

View File

@ -107,7 +107,6 @@ public:
SDVersion version;
bool vae_decode_only = false;
bool external_vae_is_invalid = false;
bool free_params_immediately = false;
std::shared_ptr<RNG> rng = std::make_shared<PhiloxRNG>();
@ -322,7 +321,6 @@ public:
LOG_INFO("loading vae from '%s'", sd_ctx_params->vae_path);
if (!model_loader.init_from_file(sd_ctx_params->vae_path, "vae.")) {
LOG_WARN("loading vae from '%s' failed", sd_ctx_params->vae_path);
external_vae_is_invalid = true;
}
}
@ -621,10 +619,10 @@ public:
first_stage_model->set_conv2d_direct_enabled(true);
}
if (sd_version_is_sdxl(version) &&
(strlen(SAFE_STR(sd_ctx_params->vae_path)) == 0 || sd_ctx_params->force_sdxl_vae_conv_scale || external_vae_is_invalid)) {
(strlen(SAFE_STR(sd_ctx_params->vae_path)) == 0 || sd_ctx_params->force_sdxl_vae_conv_scale)) {
float vae_conv_2d_scale = 1.f / 32.f;
LOG_WARN(
"No valid VAE specified with --vae or --force-sdxl-vae-conv-scale flag set, "
"No VAE specified with --vae or --force-sdxl-vae-conv-scale flag set, "
"using Conv2D scale %.3f",
vae_conv_2d_scale);
first_stage_model->set_conv2d_scale(vae_conv_2d_scale);

View File

@ -919,23 +919,17 @@ std::vector<std::string> token_split(const std::string& text) {
// `\s*[\r\n]+|\s+(?!\S)|\s+`
if (is_space(cp)) {
std::string token;
bool saw_new_line = false;
std::string token = codepoint_to_utf8(cp);
++i;
while (i < cps.size() && is_space(cps[i])) {
token += codepoint_to_utf8(cps[i]);
++i;
if (cps[i] == U'\r' || cps[i] == U'\n') {
saw_new_line = true;
} else {
if (saw_new_line) {
break;
}
}
++i;
}
tokens.push_back(token);
continue;
}