@@ -226,6 +226,7 @@ protected override void BuildPrompt(BuildPromptEventArgs args)
226226 var nodes = builder . Nodes ;
227227
228228 var selectImageCard = StackCardViewModel . GetCard < SelectImageCardViewModel > ( ) ;
229+ var outpaintCard = StackCardViewModel . GetCard < OutpaintCardViewModel > ( ) ;
229230
230231 if ( selectImageCard ? . ImageSource == null ) return ;
231232 selectImageCard . ApplyStep ( args ) ;
@@ -281,8 +282,6 @@ protected override void BuildPrompt(BuildPromptEventArgs args)
281282 // === SMART OUTPAINT ASSIST ===
282283 if ( SmartOutpaintAssistEnabled )
283284 {
284- var outpaintCard = StackCardViewModel . GetCard < OutpaintCardViewModel > ( ) ;
285-
286285 var injection = PromptInjectionOutpaint . Build (
287286 outpaintCard ? . ExpandLeft ?? 0 ,
288287 outpaintCard ? . ExpandRight ?? 0 ,
@@ -294,14 +293,16 @@ protected override void BuildPrompt(BuildPromptEventArgs args)
294293 // Append to positive prompt
295294 if ( ! string . IsNullOrWhiteSpace ( injection . Positive ) )
296295 {
297- prompt . Text += injection . Positive ;
296+ var originalText = prompt . Inputs [ "text" ] ? . ToString ( ) ?? "" ;
297+ prompt . Inputs [ "text" ] = originalText + injection . Positive ;
298298 Console . WriteLine ( $ "🧠 SmartOutpaintAssist Positive: { injection . Positive } ") ;
299299 }
300300
301301 // Append to negative prompt
302302 if ( ! string . IsNullOrWhiteSpace ( injection . Negative ) )
303303 {
304- negative . Text += injection . Negative ;
304+ var originalNeg = negative . Inputs [ "text" ] ? . ToString ( ) ?? "" ;
305+ negative . Inputs [ "text" ] = originalNeg + injection . Negative ;
305306 Console . WriteLine ( $ "🧠 SmartOutpaintAssist Negative: { injection . Negative } ") ;
306307 }
307308}
0 commit comments