Skip to content

docs: fix Contribute node import error #7968

New issue

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

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

Already on GitHub? # to your account

Merged
merged 1 commit into from
Apr 30, 2025

Conversation

ubansi
Copy link
Contributor

@ubansi ubansi commented Apr 28, 2025

When I followed the Contribute Node documentation, I encountered an import error. This commit fixes the error, which will help reduce debugging time for all future contributors.

Summary

  • Fixes import path: Changed import path from invokeai.app.invocations.baseinvocation to the correct invokeai.invocation_api.
  • Cleans up imports: Removed unused imports (ResourceOrigin, ImageCategory) from the example code.
  • Updates example node: Changed the example import class in __init__.py from CoolInvocation to ResizeInvocation (to match the documented example node). This ensures that following the documented steps now results in a working node.
  • May future new contributors never know the specific flavor of import error pain this caused.

Related Issues / Discussions

Addresses a common issue encountered by users attempting to develop custom nodes, specifically related to import errors when following the documentation.

QA Instructions

To verify this fix, please follow the steps outlined in the "Contribute Nodes" documentation section that was modified by this PR. Confirm that the import error previously encountered no longer occurs when setting up a basic custom node as described in the updated documentation.

Merge Plan

Standard merge is sufficient for this documentation change.

Checklist

  • The PR has a short but descriptive title, suitable for a changelog
  • Tests added / updated (if applicable) (Automated tests are typically not required for documentation changes)
  • Documentation added / updated (if applicable)
  • Updated What's New copy (if doing a release after this PR) (Documentation fixes usually don't require a What's New entry)

@github-actions github-actions bot added the docs PRs that change docs label Apr 28, 2025
When I followed the Contribute Node documentation, I encountered an import error.
This commit fixes the error, which will help reduce debugging time for all future contributors.
@ubansi ubansi force-pushed the document/fix_contribute_node branch from c87321c to f15fe1b Compare April 29, 2025 21:07
@hipsterusername
Copy link
Member

Thank you!

@hipsterusername hipsterusername enabled auto-merge (rebase) April 30, 2025 01:02
@hipsterusername hipsterusername merged commit 7b446ee into invoke-ai:main Apr 30, 2025
12 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
docs PRs that change docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants