Skip to content

Commit ee674a5

Browse files
committed
Fix default args
1 parent 6cbcbe0 commit ee674a5

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
@@ -824,13 +824,15 @@ namespace Flux {
824824
};
825825

826826
struct FluxRunner : public GGMLRunner {
827+
static std::map<std::string, enum ggml_type> empty_tensor_types;
828+
827829
public:
828830
FluxParams flux_params;
829831
Flux flux;
830832
std::vector<float> pe_vec; // for cache
831833

832834
FluxRunner(ggml_backend_t backend,
833-
std::map<std::string, enum ggml_type>& tensor_types = std::map<std::string, enum ggml_type>(),
835+
std::map<std::string, enum ggml_type>& tensor_types = empty_tensor_types,
834836
const std::string prefix = "",
835837
SDVersion version = VERSION_FLUX_DEV,
836838
bool flash_attn = false)

mmdit.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -872,12 +872,13 @@ struct MMDiT : public GGMLBlock {
872872
return x;
873873
}
874874
};
875-
876875
struct MMDiTRunner : public GGMLRunner {
877876
MMDiT mmdit;
878877

878+
static std::map<std::string, enum ggml_type> empty_tensor_types;
879+
879880
MMDiTRunner(ggml_backend_t backend,
880-
std::map<std::string, enum ggml_type>& tensor_types = std::map<std::string, enum ggml_type>(),
881+
std::map<std::string, enum ggml_type>& tensor_types = empty_tensor_types,
881882
const std::string prefix = "",
882883
SDVersion version = VERSION_SD3_2B)
883884
: 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)