Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions clip.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __CLIP_HPP__
#define __CLIP_HPP__
#ifndef SD_CLIP_HPP
#define SD_CLIP_HPP

#include "ggml_extend.hpp"
#include "model.h"
Expand Down Expand Up @@ -959,4 +959,4 @@ struct CLIPTextModelRunner : public GGMLRunner {
}
};

#endif // __CLIP_HPP__
#endif // SD_CLIP_HPP
6 changes: 3 additions & 3 deletions common.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __COMMON_HPP__
#define __COMMON_HPP__
#ifndef SD_COMMON_HPP
#define SD_COMMON_HPP

#include "ggml_extend.hpp"

Expand Down Expand Up @@ -520,4 +520,4 @@ class VideoResBlock : public ResBlock {
}
};

#endif // __COMMON_HPP__
#endif // SD_COMMON_HPP
6 changes: 3 additions & 3 deletions conditioner.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __CONDITIONER_HPP__
#define __CONDITIONER_HPP__
#ifndef SD_CONDITIONER_HPP
#define SD_CONDITIONER_HPP

#include "clip.hpp"
#include "t5.hpp"
Expand Down Expand Up @@ -1437,4 +1437,4 @@ struct T5CLIPEmbedder : public Conditioner {
}
};

#endif
#endif // SD_CONDITIONER_HPP
6 changes: 3 additions & 3 deletions control.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __CONTROL_HPP__
#define __CONTROL_HPP__
#ifndef SD_CONTROL_HPP
#define SD_CONTROL_HPP

#include "common.hpp"
#include "ggml_extend.hpp"
Expand Down Expand Up @@ -467,4 +467,4 @@ struct ControlNet : public GGMLRunner {
}
};

#endif // __CONTROL_HPP__
#endif // SD_CONTROL_HPP
6 changes: 3 additions & 3 deletions denoiser.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __DENOISER_HPP__
#define __DENOISER_HPP__
#ifndef SD_DENOISER_HPP
#define SD_DENOISER_HPP

#include "ggml_extend.hpp"
#include "gits_noise.inl"
Expand Down Expand Up @@ -1401,4 +1401,4 @@ static void sample_k_diffusion(sample_method_t method,
}
}

#endif // __DENOISER_HPP__
#endif // SD_DENOISER_HPP
6 changes: 3 additions & 3 deletions diffusion_model.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __DIFFUSION_MODEL_H__
#define __DIFFUSION_MODEL_H__
#ifndef SD_DIFFUSION_MODEL_HPP
#define SD_DIFFUSION_MODEL_HPP

#include "flux.hpp"
#include "mmdit.hpp"
Expand Down Expand Up @@ -260,4 +260,4 @@ struct WanModel : public DiffusionModel {
}
};

#endif
#endif // SD_DIFFUSION_MODEL_HPP
6 changes: 3 additions & 3 deletions esrgan.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __ESRGAN_HPP__
#define __ESRGAN_HPP__
#ifndef SD_ESRGAN_HPP
#define SD_ESRGAN_HPP

#include "ggml_extend.hpp"
#include "model.h"
Expand Down Expand Up @@ -207,4 +207,4 @@ struct ESRGAN : public GGMLRunner {
}
};

#endif // __ESRGAN_HPP__
#endif // SD_ESRGAN_HPP
6 changes: 3 additions & 3 deletions examples/cli/avi_writer.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __AVI_WRITER_H__
#define __AVI_WRITER_H__
#ifndef SD_AVI_WRITER_H
#define SD_AVI_WRITER_H

#include <stdint.h>
#include <stdio.h>
Expand Down Expand Up @@ -214,4 +214,4 @@ int create_mjpg_avi_from_sd_images(const char* filename, sd_image_t* images, int
return 0;
}

#endif // __AVI_WRITER_H__
#endif // SD_AVI_WRITER_H
6 changes: 3 additions & 3 deletions flux.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __FLUX_HPP__
#define __FLUX_HPP__
#ifndef SD_FLUX_HPP
#define SD_FLUX_HPP

#include <vector>

Expand Down Expand Up @@ -1115,4 +1115,4 @@ namespace Flux {

} // namespace Flux

#endif // __FLUX_HPP__
#endif // SD_FLUX_HPP
6 changes: 3 additions & 3 deletions ggml_extend.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __GGML_EXTEND_HPP__
#define __GGML_EXTEND_HPP__
#ifndef SD_GGML_EXTEND_HPP
#define SD_GGML_EXTEND_HPP

#include <assert.h>
#include <inttypes.h>
Expand Down Expand Up @@ -2181,4 +2181,4 @@ class MultiheadAttention : public GGMLBlock {
}
};

#endif // __GGML_EXTEND__HPP__
#endif // SD_GGML_EXTEND_HPP
6 changes: 3 additions & 3 deletions gguf_reader.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __GGUF_READER_HPP__
#define __GGUF_READER_HPP__
#ifndef SD_GGUF_READER_HPP
#define SD_GGUF_READER_HPP

#include <cstdint>
#include <fstream>
Expand Down Expand Up @@ -228,4 +228,4 @@ class GGUFReader {
size_t data_offset() const { return data_offset_; }
};

#endif // __GGUF_READER_HPP__
#endif // SD_GGUF_READER_HPP
6 changes: 3 additions & 3 deletions lora.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __LORA_HPP__
#define __LORA_HPP__
#ifndef SD_LORA_HPP
#define SD_LORA_HPP

#include "ggml_extend.hpp"

Expand Down Expand Up @@ -880,4 +880,4 @@ struct LoraModel : public GGMLRunner {
}
};

#endif // __LORA_HPP__
#endif // SD_LORA_HPP
6 changes: 3 additions & 3 deletions ltxv.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __LTXV_HPP__
#define __LTXV_HPP__
#ifndef SD_LTXV_HPP
#define SD_LTXV_HPP

#include "common.hpp"
#include "ggml_extend.hpp"
Expand Down Expand Up @@ -71,4 +71,4 @@ namespace LTXV {

};

#endif
#endif // SD_LTXV_HPP
6 changes: 3 additions & 3 deletions mmdit.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __MMDIT_HPP__
#define __MMDIT_HPP__
#ifndef SD_MMDIT_HPP
#define SD_MMDIT_HPP

#include "ggml_extend.hpp"
#include "model.h"
Expand Down Expand Up @@ -974,4 +974,4 @@ struct MMDiTRunner : public GGMLRunner {
}
};

#endif
#endif // SD_MMDIT_HPP
6 changes: 3 additions & 3 deletions model.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __MODEL_H__
#define __MODEL_H__
#ifndef SD_MODEL_H
#define SD_MODEL_H

#include <functional>
#include <map>
Expand Down Expand Up @@ -261,4 +261,4 @@ class ModelLoader {
static std::string load_umt5_tokenizer_json();
};

#endif // __MODEL_H__
#endif // SD_MODEL_H
6 changes: 3 additions & 3 deletions pmid.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __PMI_HPP__
#define __PMI_HPP__
#ifndef SD_PMI_HPP
#define SD_PMI_HPP

#include "ggml_extend.hpp"

Expand Down Expand Up @@ -849,4 +849,4 @@ struct PhotoMakerIDEmbed : public GGMLRunner {
}
};

#endif // __PMI_HPP__
#endif // SD_PMI_HPP
6 changes: 3 additions & 3 deletions preprocessing.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __PREPROCESSING_HPP__
#define __PREPROCESSING_HPP__
#ifndef SD_PREPROCESSING_HPP
#define SD_PREPROCESSING_HPP

#include "ggml_extend.hpp"
#define M_PI_ 3.14159265358979323846
Expand Down Expand Up @@ -224,4 +224,4 @@ uint8_t* preprocess_canny(uint8_t* img, int width, int height, float high_thresh
return output;
}

#endif // __PREPROCESSING_HPP__
#endif // SD_PREPROCESSING_HPP
6 changes: 3 additions & 3 deletions rng.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __RNG_H__
#define __RNG_H__
#ifndef SD_RNG_HPP
#define SD_RNG_HPP

#include <random>
#include <vector>
Expand Down Expand Up @@ -32,4 +32,4 @@ class STDDefaultRNG : public RNG {
}
};

#endif // __RNG_H__
#endif // SD_RNG_HPP
6 changes: 3 additions & 3 deletions rng_philox.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __RNG_PHILOX_H__
#define __RNG_PHILOX_H__
#ifndef SD_RNG_PHILOX_HPP
#define SD_RNG_PHILOX_HPP

#include <cmath>
#include <vector>
Expand Down Expand Up @@ -122,4 +122,4 @@ class PhiloxRNG : public RNG {
}
};

#endif // __RNG_PHILOX_H__
#endif // SD_RNG_PHILOX_HPP
6 changes: 3 additions & 3 deletions rope.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __ROPE_HPP__
#define __ROPE_HPP__
#ifndef SD_ROPE_HPP
#define SD_ROPE_HPP

#include <vector>
#include "ggml_extend.hpp"
Expand Down Expand Up @@ -249,4 +249,4 @@ struct Rope {
}
}; // struct Rope

#endif // __ROPE_HPP__
#endif // SD_ROPE_HPP
6 changes: 3 additions & 3 deletions stable-diffusion.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __STABLE_DIFFUSION_H__
#define __STABLE_DIFFUSION_H__
#ifndef SD_STABLE_DIFFUSION_H
#define SD_STABLE_DIFFUSION_H

#if defined(_WIN32) || defined(__CYGWIN__)
#ifndef SD_BUILD_SHARED_LIB
Expand Down Expand Up @@ -278,4 +278,4 @@ SD_API uint8_t* preprocess_canny(uint8_t* img,
}
#endif

#endif // __STABLE_DIFFUSION_H__
#endif // SD_STABLE_DIFFUSION_H
6 changes: 3 additions & 3 deletions t5.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __T5_HPP__
#define __T5_HPP__
#ifndef SD_T5_HPP
#define SD_T5_HPP

#include <float.h>
#include <limits>
Expand Down Expand Up @@ -1032,4 +1032,4 @@ struct T5Embedder {
}
};

#endif // __T5_HPP__
#endif // SD_T5_HPP
6 changes: 3 additions & 3 deletions tae.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __TAE_HPP__
#define __TAE_HPP__
#ifndef SD_TAE_HPP
#define SD_TAE_HPP

#include "ggml_extend.hpp"

Expand Down Expand Up @@ -270,4 +270,4 @@ struct TinyAutoEncoder : public GGMLRunner {
}
};

#endif // __TAE_HPP__
#endif // SD_TAE_HPP
6 changes: 3 additions & 3 deletions unet.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __UNET_HPP__
#define __UNET_HPP__
#ifndef SD_UNET_HPP
#define SD_UNET_HPP

#include "common.hpp"
#include "ggml_extend.hpp"
Expand Down Expand Up @@ -671,4 +671,4 @@ struct UNetModelRunner : public GGMLRunner {
}
};

#endif // __UNET_HPP__
#endif // SD_UNET_HPP
7 changes: 4 additions & 3 deletions util.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __UTIL_H__
#define __UTIL_H__
#ifndef SD_UTIL_H
#define SD_UTIL_H

#include <cstdint>
#include <string>
Expand Down Expand Up @@ -63,4 +63,5 @@ std::vector<std::pair<std::string, float>> parse_prompt_attention(const std::str
#define LOG_INFO(format, ...) log_printf(SD_LOG_INFO, __FILE__, __LINE__, format, ##__VA_ARGS__)
#define LOG_WARN(format, ...) log_printf(SD_LOG_WARN, __FILE__, __LINE__, format, ##__VA_ARGS__)
#define LOG_ERROR(format, ...) log_printf(SD_LOG_ERROR, __FILE__, __LINE__, format, ##__VA_ARGS__)
#endif // __UTIL_H__

#endif // SD_UTIL_H
6 changes: 3 additions & 3 deletions vae.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __VAE_HPP__
#define __VAE_HPP__
#ifndef SD_VAE_HPP
#define SD_VAE_HPP

#include "common.hpp"
#include "ggml_extend.hpp"
Expand Down Expand Up @@ -638,4 +638,4 @@ struct AutoEncoderKL : public VAE {
};
};

#endif
#endif // SD_VAE_HPP
6 changes: 3 additions & 3 deletions wan.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __WAN_HPP__
#define __WAN_HPP__
#ifndef SD_WAN_HPP
#define SD_WAN_HPP

#include <map>

Expand Down Expand Up @@ -2154,4 +2154,4 @@ namespace WAN {

} // namespace WAN

#endif // __WAN_HPP__
#endif // SD_WAN_HPP