Skip to content

Commit e660807

Browse files
committed
refactor(tx): add default params util
Signed-off-by: thxCode <thxcode0824@gmail.com>
1 parent f4967cb commit e660807

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

stable-diffusion.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1846,3 +1846,10 @@ SD_API sd_image_t* img2vid(sd_ctx_t* sd_ctx,
18461846

18471847
return result_images;
18481848
}
1849+
1850+
int sd_get_version(sd_ctx_t* sd_ctx) {
1851+
if (sd_ctx == NULL) {
1852+
return VERSION_COUNT;
1853+
}
1854+
return sd_ctx->sd->version;
1855+
}

stable-diffusion.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,8 @@ SD_API sd_image_t* img2vid(sd_ctx_t* sd_ctx,
209209
float strength,
210210
int64_t seed);
211211

212+
SD_API int sd_get_version(sd_ctx_t* sd_ctx);
213+
212214
typedef struct upscaler_ctx_t upscaler_ctx_t;
213215

214216
SD_API upscaler_ctx_t* new_upscaler_ctx(const char* esrgan_path,

0 commit comments

Comments
 (0)