Skip to content
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

fix: make dev_reload work for files in nodes/ #7819

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

Conversation

keturn
Copy link
Contributor

@keturn keturn commented Mar 21, 2025

Summary

The dev_reload option to load Python changes on the fly should work for custom nodes as well as Invoke's own sources.

(Have y'all been trying to write nodes without this? Or do you have another hot-reloading mechanism you've been using instead?)

QA Instructions

  1. have some code in a nodes/ subdirectory.
  2. Run invoke with INVOKEAI_DEV_RELOAD=true environment variable. (Or set dev_reload = True in your `invokeai.yaml'.)
  3. Run invokeai-web
  4. Startup logs should include a [jurigged] Watch line for your nodes source.
  5. When you edit that file, the log should include a [jurigged] Update line for it.

Merge Plan

N/A

Checklist

  • The PR has a short but descriptive title, suitable for a changelog
  • N/A Tests added / updated (if applicable)
  • N/A Documentation added / updated (if applicable)
  • Updated What's New copy (if doing a release after this PR)

@keturn
Copy link
Contributor Author

keturn commented Mar 21, 2025

Alternatively, we could make load_custom_nodes explicitly communicate with jurigged, but this is easier and almost as effective.

The one gap is if someday in the future we change it so load_custom_nodes is called again later somewhere else.

@keturn keturn force-pushed the fix/nodes-hot-reload branch from e795ca2 to b1b2c33 Compare March 21, 2025 17:41
@keturn keturn force-pushed the fix/nodes-hot-reload branch from b1b2c33 to 41950d8 Compare March 21, 2025 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python PRs that change python files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant