mirror of
https://github.com/leejet/stable-diffusion.cpp.git
synced 2026-11-11 19:36:33 +00:00
Initial commit
This commit is contained in:
commit
3aca342e60
23 files changed
+5312
No files matched your search
@@ -0,0 +1,41 @@
|
||||
#ifndef __STABLE_DIFFUSION_H__
|
||||
#define __STABLE_DIFFUSION_H__
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
enum class SDLogLevel {
|
||||
DEBUG,
|
||||
INFO,
|
||||
WARN,
|
||||
ERROR
|
||||
};
|
||||
|
||||
enum SampleMethod {
|
||||
EULAR_A,
|
||||
};
|
||||
|
||||
class StableDiffusionGGML;
|
||||
|
||||
class StableDiffusion {
|
||||
private:
|
||||
std::shared_ptr<StableDiffusionGGML> sd;
|
||||
|
||||
public:
|
||||
StableDiffusion(int n_threads = -1);
|
||||
bool load_from_file(const std::string& file_path);
|
||||
std::vector<uint8_t> txt2img(
|
||||
const std::string& prompt,
|
||||
const std::string& negative_prompt,
|
||||
float cfg_scale,
|
||||
int width,
|
||||
int height,
|
||||
SampleMethod sample_method,
|
||||
int sample_steps,
|
||||
int seed);
|
||||
};
|
||||
|
||||
void set_sd_log_level(SDLogLevel level);
|
||||
std::string sd_get_system_info();
|
||||
|
||||
#endif // __STABLE_DIFFUSION_H__
|
||||
Reference in new issue
Block a user