Skip to content

Allow saving generated ControlNet previews#1364

Draft
jtreminio wants to merge 2 commits intomcmonkeyprojects:masterfrom
jtreminio:controlnet-save
Draft

Allow saving generated ControlNet previews#1364
jtreminio wants to merge 2 commits intomcmonkeyprojects:masterfrom
jtreminio:controlnet-save

Conversation

@jtreminio
Copy link
Copy Markdown
Contributor

CleanShot.2026-05-02.at.13.05.55.mp4

@jtreminio jtreminio marked this pull request as ready for review May 2, 2026 18:07
Comment thread src/Text2Image/T2IEngine.cs Outdated
Comment thread src/wwwroot/js/genpage/gentab/params.js Outdated
Comment thread src/wwwroot/js/genpage/gentab/params.js Outdated
@jtreminio
Copy link
Copy Markdown
Contributor Author

Per discord conversation, should save directly to inputs/controlnet and not inputs/_comfyN/controlnet. The existing design is clear now, and this PR is much smaller.

@jtreminio
Copy link
Copy Markdown
Contributor Author

With the recent refactor, now getting an error. Setting this back to draft while I hunt down the issue:

21:49:35.490 [Error] Error in websocket handler: System.AggregateException: One or more errors occurred. (Invalid value for parameter ControlNet Image Input)
 ---> System.Exception: Invalid value for parameter ControlNet Image Input
 ---> System.IO.DirectoryNotFoundException: Could not find a part of the path '/workspace/Output/local/inputs/controlnet/controlnet-preview-2026-05-09_21-49-10-336.mp4'.
   at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirError)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, UnixFileMode openPermissions, Int64& fileLength, UnixFileMode& filePermissions, Boolean failForSymlink, Boolean& wasSymlink, Func`4 createOpenException)
   at System.IO.File.ReadAllBytes(String path)
   at SwarmUI.Text2Image.T2IParamTypes.FilePathToDataString(Session session, String filePath, String errorContext) in /workspace/src/Text2Image/T2IParamTypes.cs:line 1143
   at SwarmUI.Text2Image.T2IParamTypes.ValidateParam(T2IParamType type, String val, Session session) in /workspace/src/Text2Image/T2IParamTypes.cs:line 1075
   at SwarmUI.Text2Image.T2IParamTypes.ApplyParameter(String paramTypeName, String value, T2IParamInput data, Int32 sectionId) in /workspace/src/Text2Image/T2IParamTypes.cs:line 1168
   --- End of inner exception stack trace ---
   at SwarmUI.Text2Image.T2IParamTypes.ApplyParameter(String paramTypeName, String value, T2IParamInput data, Int32 sectionId) in /workspace/src/Text2Image/T2IParamTypes.cs:line 1177
   at SwarmUI.WebAPI.T2IAPI.RequestToParams(Session session, JObject rawInput, Boolean applyPresets) in /workspace/src/WebAPI/T2IAPI.cs:line 213
   at SwarmUI.WebAPI.T2IAPI.GenT2I_Internal(Session session, ValueTuple`4 input, Action`1 output, Boolean isWS) in /workspace/src/WebAPI/T2IAPI.cs:line 268
   --- End of inner exception stack trace ---

@jtreminio jtreminio marked this pull request as draft May 10, 2026 02:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants