@@ -278,35 +278,35 @@ protected override void BuildPrompt(BuildPromptEventArgs args)
278278 Clip = checkpoint . Output2 ,
279279 Text = ""
280280 } ) ;
281+ // === SMART OUTPAINT ASSIST ===
282+ if ( SmartOutpaintAssistEnabled )
283+ {
284+ var injection = PromptInjectionOutpaint . Build (
285+ outpaintCard ? . ExpandLeft ?? 0 ,
286+ outpaintCard ? . ExpandRight ?? 0 ,
287+ outpaintCard ? . ExpandTop ?? 0 ,
288+ outpaintCard ? . ExpandBottom ?? 0 ,
289+ SmartOutpaintInjectionStrength
290+ ) ;
281291
282- // === SMART OUTPAINT ASSIST ===
283- if ( SmartOutpaintAssistEnabled )
284- {
285- var injection = PromptInjectionOutpaint . Build (
286- outpaintCard ? . ExpandLeft ?? 0 ,
287- outpaintCard ? . ExpandRight ?? 0 ,
288- outpaintCard ? . ExpandTop ?? 0 ,
289- outpaintCard ? . ExpandBottom ?? 0 ,
290- SmartOutpaintInjectionStrength
291- ) ;
292-
293- // Append to positive prompt
292+ // Positive
294293 if ( ! string . IsNullOrWhiteSpace ( injection . Positive ) )
295294 {
296- var originalText = prompt . Inputs [ "text" ] ? . ToString ( ) ?? "" ;
297- prompt . Inputs [ "text" ] = originalText + injection . Positive ;
295+ var originalText = prompt . Text ?? "" ;
296+ builder . SetInput ( prompt , "text" , originalText + injection . Positive ) ;
298297 Console . WriteLine ( $ "🧠 SmartOutpaintAssist Positive: { injection . Positive } ") ;
299298 }
300299
301- // Append to negative prompt
300+ // Negative
302301 if ( ! string . IsNullOrWhiteSpace ( injection . Negative ) )
303302 {
304- var originalNeg = negative . Inputs [ "text" ] ? . ToString ( ) ?? "" ;
305- negative . Inputs [ "text" ] = originalNeg + injection . Negative ;
303+ var originalNeg = negative . Text ?? "" ;
304+ builder . SetInput ( negative , "text" , originalNeg + injection . Negative ) ;
306305 Console . WriteLine ( $ "🧠 SmartOutpaintAssist Negative: { injection . Negative } ") ;
307306 }
308307}
309308
309+
310310
311311 // --- ENCODE ---
312312 var vaeEncode = nodes . AddTypedNode ( new ComfyNodeBuilder . VAEEncode
0 commit comments