Skip to content

Commit ac269e7

Browse files
committed
refactor(tx): adjust log
Signed-off-by: thxCode <thxcode0824@gmail.com>
1 parent 5e378d5 commit ac269e7

File tree

2 files changed

+6
-26
lines changed

2 files changed

+6
-26
lines changed

model.cpp

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1564,20 +1564,7 @@ SDVersion ModelLoader::get_sd_version() {
15641564
}
15651565

15661566
ggml_type ModelLoader::get_sd_wtype() {
1567-
for (auto& tensor_storage : tensor_storages) {
1568-
if (is_unused_tensor(tensor_storage.name)) {
1569-
continue;
1570-
}
1571-
1572-
if (ggml_is_quantized(tensor_storage.type)) {
1573-
return tensor_storage.type;
1574-
}
1575-
1576-
if (tensor_should_be_converted(tensor_storage, GGML_TYPE_Q4_K)) {
1577-
return tensor_storage.type;
1578-
}
1579-
}
1580-
return GGML_TYPE_COUNT;
1567+
return get_diffusion_model_wtype();
15811568
}
15821569

15831570
ggml_type ModelLoader::get_conditioner_wtype() {

stable-diffusion.cpp

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ const char* model_version_to_str[] = {
3030
"SDXL",
3131
"SDXL Refiner",
3232
"SVD",
33-
"SD3 2B",
33+
"SD3 Medium",
3434
"Flux Dev",
3535
"Flux Schnell",
36-
"SD3.5 8B",
37-
"SD3.5 2B",
38-
"Flux Lite 8B",
36+
"SD3.5 Large",
37+
"SD3.5 Medium",
38+
"Flux Lite",
3939
};
4040

4141
const char* sampling_methods_str[] = {
@@ -338,13 +338,6 @@ class StableDiffusionGGML {
338338

339339
if (version == VERSION_SDXL || version == VERSION_SDXL_REFINER) {
340340
scale_factor = 0.13025f;
341-
if (vae_path.size() == 0 && taesd_path.size() == 0) {
342-
LOG_WARN(
343-
"!!!It looks like you are using SDXL model. "
344-
"If you find that the generated images are completely black, "
345-
"try specifying SDXL VAE FP16 Fix with the --vae parameter. "
346-
"You can find it here: https://huggingface.co/madebyollin/sdxl-vae-fp16-fix/blob/main/sdxl_vae.safetensors");
347-
}
348341
} else if (sd_version_is_sd3(version)) {
349342
scale_factor = 1.5305f;
350343
} else if (sd_version_is_flux(version)) {
@@ -376,7 +369,7 @@ class StableDiffusionGGML {
376369
if (sd_version_is_dit(version)) {
377370
use_t5xxl = true;
378371
}
379-
if (!ggml_backend_is_cpu(backend) && use_t5xxl && conditioner_wtype != GGML_TYPE_F32) {
372+
if (!ggml_backend_is_cpu(backend) && use_t5xxl && conditioner_wtype != diffusion_model_wtype) {
380373
clip_on_cpu = true;
381374
LOG_INFO("set clip_on_cpu to true");
382375
}

0 commit comments

Comments
 (0)