gokayfem / ComfyUI-Texture-Simple

Visualize your textures inside ComfyUI
GNU General Public License v3.0
43 stars 7 forks source link

Node doesn't load in latest ComfyUI frontend #6

Open UXVirtual opened 3 months ago

UXVirtual commented 3 months ago

On August 15th, ComfyUI transitioned to a new frontend UI framework which has caused breaking changes to the TextureViewer node. This prevents the Three.js scene from loading correctly and it remains stuck on the "Loading scene" preloader title.

When comparing the new ComfyUI frontend UI and the legacy one we can see the following:

Legacy Frontend UI

Screenshot 2024-08-24 211439

New Frontend UI

Screenshot 2024-08-24 211649

If users have updated to the latest ComfyUI a Uncaught TypeError: Cannot read properties of undefined (reading 'api') at api.js:2:36 is thrown in the JavaScript console. Looking at this it seems to reference a shim which is no longer valid.

To workaround this issue in the meantime, starting ComfyUI with the --front-end-version Comfy-Org/ComfyUI_legacy_frontend@latest as described in this issue allows the TextureViewer node to work.

Tested this issue and the workaround using the mtb nodes workflow linked in the project README.

huchenlei commented 3 months ago

This is wield. The shim should access the api object bind on window.comfyAPI. Can you check if your browser console what does following code eval to?

image

UXVirtual commented 3 months ago

window.comfyAPI resolves as follows in the console:

Screenshot 2024-08-25 204956

Screenshot 2024-08-25 205024

Mattssn commented 2 months ago

Heya, really like the idea of this node, but still seems it doesn't work, will this be updated to work with newer versions?

Dayuppy commented 1 month ago

Can confirm the issue still exists.

Sergio-Redraw commented 1 month ago

up