Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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