Skip to content

Commit 4e85dfb

Browse files
committed
restore original comments
1 parent c242dd4 commit 4e85dfb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

stable-diffusion.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -591,6 +591,7 @@ class StableDiffusionGGML {
591591
denoiser->schedule->version = version;
592592
break;
593593
case DEFAULT:
594+
// Don't touch anything.
594595
break;
595596
default:
596597
LOG_ERROR("Unknown schedule %i", schedule);
@@ -910,13 +911,16 @@ class StableDiffusionGGML {
910911
auto guidance_tensor = vector_to_ggml_tensor(work_ctx, guidance_vec);
911912

912913
copy_ggml_tensor(noised_input, input);
914+
// noised_input = noised_input * c_in
913915
ggml_tensor_scale(noised_input, c_in);
914916

915917
std::vector<struct ggml_tensor*> controls;
916918

917919
if (control_hint != NULL) {
918920
control_net->compute(n_threads, noised_input, control_hint, timesteps, cond.c_crossattn, cond.c_vector);
919921
controls = control_net->controls;
922+
// print_ggml_tensor(controls[12]);
923+
// GGML_ASSERT(0);
920924
}
921925

922926
if (start_merge_step == -1 || step <= start_merge_step) {
@@ -1553,7 +1557,7 @@ sd_image_t* generate_image(sd_ctx_t* sd_ctx,
15531557
slg_scale,
15541558
skip_layer_start,
15551559
skip_layer_end,
1556-
shifted_timestep, // Passed parameter
1560+
shifted_timestep,
15571561
noise_mask);
15581562

15591563
// struct ggml_tensor* x_0 = load_tensor_from_file(ctx, "samples_ddim.bin");

0 commit comments

Comments
 (0)