Skip to content

Commit b7a379a

Browse files
committed
Fix default args
1 parent 680757d commit b7a379a

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

flux.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -802,13 +802,15 @@ namespace Flux {
802802
};
803803

804804
struct FluxRunner : public GGMLRunner {
805+
static std::map<std::string, enum ggml_type> empty_tensor_types;
806+
805807
public:
806808
FluxParams flux_params;
807809
Flux flux;
808810
std::vector<float> pe_vec; // for cache
809811

810812
FluxRunner(ggml_backend_t backend,
811-
std::map<std::string, enum ggml_type>& tensor_types = std::map<std::string, enum ggml_type>(),
813+
std::map<std::string, enum ggml_type>& tensor_types = empty_tensor_types,
812814
const std::string prefix = "",
813815
SDVersion version = VERSION_FLUX_DEV)
814816
: GGMLRunner(backend) {

mmdit.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -865,12 +865,13 @@ struct MMDiT : public GGMLBlock {
865865
return x;
866866
}
867867
};
868-
869868
struct MMDiTRunner : public GGMLRunner {
870869
MMDiT mmdit;
871870

871+
static std::map<std::string, enum ggml_type> empty_tensor_types;
872+
872873
MMDiTRunner(ggml_backend_t backend,
873-
std::map<std::string, enum ggml_type>& tensor_types = std::map<std::string, enum ggml_type>(),
874+
std::map<std::string, enum ggml_type>& tensor_types = empty_tensor_types,
874875
const std::string prefix = "",
875876
SDVersion version = VERSION_SD3_2B)
876877
: GGMLRunner(backend), mmdit(version) {

t5.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -856,8 +856,10 @@ struct T5Embedder {
856856
T5UniGramTokenizer tokenizer;
857857
T5Runner model;
858858

859+
static std::map<std::string, enum ggml_type> empty_tensor_types;
860+
859861
T5Embedder(ggml_backend_t backend,
860-
std::map<std::string, enum ggml_type>& tensor_types = std::map<std::string, enum ggml_type>(),
862+
std::map<std::string, enum ggml_type>& tensor_types = empty_tensor_types,
861863
const std::string prefix = "",
862864
int64_t num_layers = 24,
863865
int64_t model_dim = 4096,

0 commit comments

Comments
 (0)