@@ -764,8 +764,6 @@ class StableDiffusionGGML {
764
764
int start_merge_step,
765
765
SDCondition id_cond) {
766
766
size_t steps = sigmas.size () - 1 ;
767
- // noise = load_tensor_from_file(work_ctx, "./rand0.bin");
768
- // print_ggml_tensor(noise);
769
767
struct ggml_tensor * x = ggml_dup_tensor (work_ctx, init_latent);
770
768
copy_ggml_tensor (x, init_latent);
771
769
x = denoiser->noise_scaling (sigmas[0 ], noise, x);
@@ -801,16 +799,13 @@ class StableDiffusionGGML {
801
799
auto guidance_tensor = vector_to_ggml_tensor (work_ctx, guidance_vec);
802
800
803
801
copy_ggml_tensor (noised_input, input);
804
- // noised_input = noised_input * c_in
805
802
ggml_tensor_scale (noised_input, c_in);
806
803
807
804
std::vector<struct ggml_tensor *> controls;
808
805
809
806
if (control_hint != NULL ) {
810
807
control_net->compute (n_threads, noised_input, control_hint, timesteps, cond.c_crossattn , cond.c_vector );
811
808
controls = control_net->controls ;
812
- // print_ggml_tensor(controls[12]);
813
- // GGML_ASSERT(0);
814
809
}
815
810
816
811
if (start_merge_step == -1 || step <= start_merge_step) {
@@ -1290,8 +1285,6 @@ sd_image_t* generate_image(sd_ctx_t* sd_ctx,
1290
1285
int start_merge_step = -1 ;
1291
1286
if (sd_ctx->sd ->stacked_id ) {
1292
1287
start_merge_step = int (sd_ctx->sd ->pmid_model ->style_strength / 100 .f * sample_steps);
1293
- // if (start_merge_step > 30)
1294
- // start_merge_step = 30;
1295
1288
LOG_INFO (" PHOTOMAKER: start_merge_step: %d" , start_merge_step);
1296
1289
}
1297
1290
@@ -1309,8 +1302,6 @@ sd_image_t* generate_image(sd_ctx_t* sd_ctx,
1309
1302
sigmas,
1310
1303
start_merge_step,
1311
1304
id_cond);
1312
- // struct ggml_tensor* x_0 = load_tensor_from_file(ctx, "samples_ddim.bin");
1313
- // print_ggml_tensor(x_0);
1314
1305
int64_t sampling_end = ggml_time_ms ();
1315
1306
LOG_INFO (" sampling completed, taking %.2fs" , (sampling_end - sampling_start) * 1 .0f / 1000 );
1316
1307
final_latents.push_back (x_0);
0 commit comments