Skip to content

Commit f196a4b

Browse files
committed
Fix default args
1 parent 8088b6d commit f196a4b

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
@@ -715,12 +715,13 @@ struct MMDiT : public GGMLBlock {
715715
return x;
716716
}
717717
};
718-
719718
struct MMDiTRunner : public GGMLRunner {
720719
MMDiT mmdit;
721720

721+
static std::map<std::string, enum ggml_type> empty_tensor_types;
722+
722723
MMDiTRunner(ggml_backend_t backend,
723-
std::map<std::string, enum ggml_type>& tensor_types = std::map<std::string, enum ggml_type>(),
724+
std::map<std::string, enum ggml_type>& tensor_types = empty_tensor_types,
724725
const std::string prefix = "",
725726
SDVersion version = VERSION_SD3_2B)
726727
: 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)