Skip to content

Improved controlnet input by keeping tempfile open during write/read#420

Open
mahdirahimi1999 wants to merge 2 commits intoreplicate:mainfrom
mahdirahimi1999:fix/tempfile-read-issue
Open

Improved controlnet input by keeping tempfile open during write/read#420
mahdirahimi1999 wants to merge 2 commits intoreplicate:mainfrom
mahdirahimi1999:fix/tempfile-read-issue

Conversation

@mahdirahimi1999
Copy link

Summary

This PR simplifies how we handle temporary files for the control image in the ControlNet pipeline. The tempfile is now used for both writing and reading without reopening it.

Changes

  • Combined write and read logic for tempfile
  • Used seek(0) to reset the file pointer

Benefits

  • Cleaner and more efficient code
  • Fewer file operations

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.

1 participant