-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Implement PBR Maps Node #8700
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
Implement PBR Maps Node #8700
Conversation
|
I gave the PBR PR a try just now. The filter option appeared, but when I tried to generate the PBR maps, the backend gave me the following error: I've got |
|
@lstein I added safe globals instead of just setting |
|
@copilot, I'm getting this error: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR implements a PBR (Physically Based Rendering) Maps generator that creates Normal, Roughness, and Displacement maps from a single input image. The implementation is based on the Material-Map-Generator project and adds a new "Filters" context menu to the image gallery for accessing image processing actions.
Key changes:
- Backend PBR maps generation using neural network models (RRDB architecture)
- New node invocation
pbr_mapsfor workflow integration - Frontend UI with context menu integration and graph building
- Model loading infrastructure for remote model downloads
Reviewed changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
invokeai/app/invocations/pbr_maps.py |
Implements the PBR Maps invocation node with image processing logic |
invokeai/backend/image_util/pbr_maps/pbr_maps.py |
Core PBR maps generator with model loading and inference |
invokeai/backend/image_util/pbr_maps/architecture/pbr_rrdb_net.py |
Neural network architecture definition for PBR models |
invokeai/backend/image_util/pbr_maps/architecture/block.py |
Reusable neural network building blocks and layers |
invokeai/backend/image_util/pbr_maps/utils/image_ops.py |
Image processing utilities for tiling and seamless operations |
invokeai/frontend/web/src/features/nodes/util/graph/filters/buildPBRFilterGraph.ts |
Graph builder for PBR filter workflow |
invokeai/frontend/web/src/features/gallery/components/ContextMenu/MenuItems/ContextMenuItemFiltersSubMenu.tsx |
New Filters submenu component for image context menu |
invokeai/frontend/web/src/features/gallery/components/ContextMenu/SingleSelectionMenuItems.tsx |
Integration of Filters submenu into context menu |
invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/addPBRFilterListener.ts |
Event listener for PBR processing requests with queue management |
invokeai/frontend/web/src/app/store/store.ts |
Registration of PBR filter listener |
invokeai/frontend/web/public/locales/en.json |
Translation strings for PBR maps feature |
invokeai/frontend/web/src/services/api/schema.ts |
Auto-generated API schema updates |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
invokeai/backend/image_util/pbr_maps/architecture/pbr_rrdb_net.py
Outdated
Show resolved
Hide resolved
.../web/src/features/gallery/components/ContextMenu/MenuItems/ContextMenuItemFiltersSubMenu.tsx
Outdated
Show resolved
Hide resolved
More relevant
|
Resolved all Copilot suggestions and ported over to using our self-hosted safetensors models instead. Working well on my end. Let me know if the issue with the 5000 series models is resolved with the non pickle files. All models auto download. 20 MB each -> 40 overall. |
lstein
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is working as advertised
Summary
Implement the node and UI to generate PBR Maps from a single given image. Based on: https://github.com/joeyballentine/Material-Map-Generator
All images now have a new context menu item called "Filters" where we can add individual image filters and image actions starting with PBR Maps.
QA Instructions
Merge Plan
Test and merge. I'd just note that we might want to host these models somewhere ourselves incase to make sure it does not break in the future.