File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -1840,7 +1840,12 @@ sd_image_t* img2img(sd_ctx_t* sd_ctx,
1840
1840
} else if (sd_version_is_edit (sd_ctx->sd ->version )) {
1841
1841
// Not actually masked, we're just highjacking the masked_latent variable since it will be used the same way
1842
1842
if (!sd_ctx->sd ->use_tiny_autoencoder ) {
1843
- masked_latent = sd_ctx->sd ->get_first_stage_encoding_mode (work_ctx, init_moments);
1843
+ if (sd_ctx->sd ->is_using_edm_v_parameterization ) {
1844
+ // for CosXL edit
1845
+ masked_latent = sd_ctx->sd ->get_first_stage_encoding (work_ctx, init_moments);
1846
+ } else {
1847
+ masked_latent = sd_ctx->sd ->get_first_stage_encoding_mode (work_ctx, init_moments);
1848
+ }
1844
1849
} else {
1845
1850
masked_latent = init_latent;
1846
1851
}
You can’t perform that action at this time.
0 commit comments