@@ -43,9 +43,9 @@ Result<uint64_t> MultimodalPrefiller::prefill(
43
43
Image image = input.get_image ();
44
44
45
45
auto method_meta = ET_UNWRAP (
46
- module_->method_meta (kImageEncoderMethod ),
46
+ module_->method_meta (kVisionEncoderMethod ),
47
47
" Failed to get method_meta for %s" ,
48
- kImageEncoderMethod );
48
+ kVisionEncoderMethod );
49
49
50
50
ET_CHECK_MSG (
51
51
method_meta.num_inputs () > 0 ,
@@ -80,7 +80,7 @@ Result<uint64_t> MultimodalPrefiller::prefill(
80
80
81
81
// Run image encoder
82
82
auto image_encoder_outputs =
83
- ET_UNWRAP (module_->execute (kImageEncoderMethod , image_tensor));
83
+ ET_UNWRAP (module_->execute (kVisionEncoderMethod , image_tensor));
84
84
85
85
encoder_output = image_encoder_outputs[0 ];
86
86
} else if (input.is_audio ()) {
@@ -175,8 +175,8 @@ ::executorch::runtime::Error MultimodalPrefiller::load() {
175
175
ET_UNWRAP (module_->method_names (), " Failed to get method names" );
176
176
177
177
// Load image_encoder method if exists.
178
- if (methods.find (kImageEncoderMethod ) != methods.end ()) {
179
- ET_CHECK_OK_OR_RETURN_ERROR (module_->load_method (kImageEncoderMethod ));
178
+ if (methods.find (kVisionEncoderMethod ) != methods.end ()) {
179
+ ET_CHECK_OK_OR_RETURN_ERROR (module_->load_method (kVisionEncoderMethod ));
180
180
}
181
181
182
182
if (methods.find (kAudioEncoderMethod ) != methods.end ()) {
@@ -203,8 +203,8 @@ bool MultimodalPrefiller::is_method_loaded() {
203
203
ET_CHECK_MSG (false , " Failed to get method names" );
204
204
}
205
205
std::unordered_set<std::string> methods = methods_res.get ();
206
- if (methods.find (kImageEncoderMethod ) != methods.end ()) {
207
- return module_->is_method_loaded (kImageEncoderMethod );
206
+ if (methods.find (kVisionEncoderMethod ) != methods.end ()) {
207
+ return module_->is_method_loaded (kVisionEncoderMethod );
208
208
}
209
209
return true ;
210
210
}
0 commit comments