-
Notifications
You must be signed in to change notification settings - Fork 5
/
stable-diffusion-abi.h
48 lines (36 loc) · 1.33 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
#ifndef STABLE_DIFFUSION_ABI_H
#define STABLE_DIFFUSION_ABI_H
#include "stable-diffusion.h"
#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
// STABLE_DIFFUSION_API void set_image_data(sd_image_t* image, uint8_t* data);
//
// STABLE_DIFFUSION_API void set_image_width(sd_image_t* image, uint32_t width);
//
// STABLE_DIFFUSION_API void set_image_height(sd_image_t* image, uint32_t height);
//
// STABLE_DIFFUSION_API void set_image_channel(sd_image_t* image, uint32_t channel);
STABLE_DIFFUSION_API uint8_t* get_image_data(const sd_image_t* images, int index);
STABLE_DIFFUSION_API uint32_t get_image_width(const sd_image_t* images, int index);
STABLE_DIFFUSION_API uint32_t get_image_height(const sd_image_t* images, int index);
STABLE_DIFFUSION_API uint32_t get_image_channel(const sd_image_t* images, int index);
STABLE_DIFFUSION_API void sd_images_free(const sd_image_t* images);
STABLE_DIFFUSION_API void sd_image_free(sd_image_t* image);
#ifdef __cplusplus
}
#endif
#endif //STABLE_DIFFUSION_ABI_H