@@ -150,6 +150,11 @@ typedef struct {
150150 float rel_size_y ;
151151} sd_tiling_params_t ;
152152
153+ typedef struct {
154+ const char * name ;
155+ const char * path ;
156+ } sd_embedding_t ;
157+
153158typedef struct {
154159 const char * model_path ;
155160 const char * clip_l_path ;
@@ -164,7 +169,8 @@ typedef struct {
164169 const char * taesd_path ;
165170 const char * control_net_path ;
166171 const char * lora_model_dir ;
167- const char * embedding_dir ;
172+ const sd_embedding_t * embeddings ;
173+ uint32_t embedding_count ;
168174 const char * photo_maker_path ;
169175 const char * tensor_type_rules ;
170176 bool vae_decode_only ;
@@ -219,6 +225,8 @@ typedef struct {
219225 int sample_steps ;
220226 float eta ;
221227 int shifted_timestep ;
228+ float * custom_sigmas ;
229+ int custom_sigmas_count ;
222230} sd_sample_params_t ;
223231
224232typedef struct {
@@ -236,6 +244,14 @@ typedef struct {
236244} sd_easycache_params_t ;
237245
238246typedef struct {
247+ bool is_high_noise ;
248+ float multiplier ;
249+ const char * path ;
250+ } sd_lora_t ;
251+
252+ typedef struct {
253+ const sd_lora_t * loras ;
254+ uint32_t lora_count ;
239255 const char * prompt ;
240256 const char * negative_prompt ;
241257 int clip_skip ;
@@ -259,6 +275,8 @@ typedef struct {
259275} sd_img_gen_params_t ;
260276
261277typedef struct {
278+ const sd_lora_t * loras ;
279+ uint32_t lora_count ;
262280 const char * prompt ;
263281 const char * negative_prompt ;
264282 int clip_skip ;
@@ -331,7 +349,8 @@ typedef struct upscaler_ctx_t upscaler_ctx_t;
331349SD_API upscaler_ctx_t * new_upscaler_ctx (const char * esrgan_path ,
332350 bool offload_params_to_cpu ,
333351 bool direct ,
334- int n_threads );
352+ int n_threads ,
353+ int tile_size );
335354SD_API void free_upscaler_ctx (upscaler_ctx_t * upscaler_ctx );
336355
337356SD_API sd_image_t upscale (upscaler_ctx_t * upscaler_ctx ,
@@ -353,8 +372,11 @@ SD_API bool preprocess_canny(sd_image_t image,
353372 float strong ,
354373 bool inverse );
355374
375+ SD_API const char * sd_commit (void );
376+ SD_API const char * sd_version (void );
377+
356378#ifdef __cplusplus
357379}
358380#endif
359381
360- #endif // __STABLE_DIFFUSION_H__
382+ #endif // __STABLE_DIFFUSION_H__
0 commit comments