@@ -120,7 +120,7 @@ protected override Task<bool> GetLoopCondition(InferStateArgs args, Cancellation
120120 }
121121
122122 /// <inheritdoc />
123- protected override async Task PreprocessInputs ( string ? text , InferStateArgs args , CancellationToken cancellationToken )
123+ protected override Task PreprocessInputs ( string ? text , InferStateArgs args , CancellationToken cancellationToken )
124124 {
125125 if ( _is_prompt_run )
126126 {
@@ -132,7 +132,7 @@ protected override async Task PreprocessInputs(string? text, InferStateArgs args
132132 }
133133 else
134134 {
135- await PreprocessLlava ( text , args , true ) ;
135+ PreprocessLlava ( text , args , true ) ;
136136 }
137137 }
138138 else
@@ -153,14 +153,16 @@ protected override async Task PreprocessInputs(string? text, InferStateArgs args
153153 }
154154 else
155155 {
156- await PreprocessLlava ( text , args , false ) ;
156+ PreprocessLlava ( text , args , false ) ;
157157 }
158158 }
159159 }
160+
161+ return Task . CompletedTask ;
160162 }
161163
162164 /// <inheritdoc />
163- private Task PreprocessLlava ( string text , InferStateArgs args , bool addBos = true )
165+ private void PreprocessLlava ( string text , InferStateArgs args , bool addBos = true )
164166 {
165167 // If the prompt contains the tag <image> extract this.
166168 _imageInPrompt = text . Contains ( "<image>" ) ;
@@ -195,7 +197,6 @@ private Task PreprocessLlava(string text, InferStateArgs args, bool addBos = tru
195197 args . RemainedTokens -= line_inp . Length ;
196198 }
197199 }
198- return Task . CompletedTask ;
199200 }
200201
201202 /// <summary>
0 commit comments