forked from seasonjs/stable-diffusion.cpp-build
-
Notifications
You must be signed in to change notification settings - Fork 0
/
stable-diffusion-abi.h
65 lines (54 loc) · 1.5 KB
/
stable-diffusion-abi.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#ifndef STABLE_DIFFUSION_ABI_H
#define STABLE_DIFFUSION_ABI_H
#include "ggml_extend.hpp"
#include "stable-diffusion.h"
#include "utility"
#ifdef STABLE_DIFFUSION_SHARED
#if defined(_WIN32) && !defined(__MINGW32__)
#ifdef STABLE_DIFFUSION_BUILD
#define STABLE_DIFFUSION_API __declspec(dllexport)
#else
#define STABLE_DIFFUSION_API __declspec(dllimport)
#endif
#else
#define STABLE_DIFFUSION_API __attribute__((visibility("default")))
#endif
#else
#define STABLE_DIFFUSION_API
#endif
#ifdef __cplusplus
extern "C" {
#endif
typedef struct {
const char *model_path;
const char *diffusion_model_path;
const char *clip_l_path;
const char *t5xxl_path;
const char *vae_path;
const char *taesd_path;
const char *control_net_path;
const char *lora_model_dir;
const char *embed_dir;
const char *id_embed_dir;
bool vae_decode_only;
bool free_params_immediately;
bool keep_clip_on_cpu;
bool keep_control_net_cpu;
bool keep_vae_on_cpu;
bool vae_tiling;
bool show_debug;
uint8_t n_threads;
uint8_t wType;
uint8_t rng_type;
uint8_t schedule;
} new_sd_ctx_go_params;
STABLE_DIFFUSION_API sd_ctx_t *
new_sd_ctx_go(new_sd_ctx_go_params *context_params);
STABLE_DIFFUSION_API sd_image_t *upscale_go(upscaler_ctx_t *ctx,
uint32_t upscale_factor,
uint32_t width, uint32_t height,
uint32_t channel, uint8_t *data);
#ifdef __cplusplus
}
#endif
#endif // STABLE_DIFFUSION_ABI_H