CurtisDS / sd-model-preview-xd

Displays preview files for models.
MIT License
72 stars 8 forks source link

AttributeError: module 'modules.sd_hijack' has no attribute 'model_hijack' #46

Closed richardm1 closed 1 month ago

richardm1 commented 1 month ago

Hi, not sure what to make of this error on startup:

Error executing callback ui_tabs_callback for S:\StabilityMatrix\Data\Packages\stable-diffusion-webui-forge\extensions\sd-model- preview-xd\scripts\modelpreview.py

Traceback (most recent call last):
  File "S:\StabilityMatrix\Data\Packages\stable-diffusion-webui-forge\modules\script_callbacks.py", line 283, in ui_tabs_callback
    res += c.callback() or []
  File "S:\StabilityMatrix\Data\Packages\stable-diffusion-webui-forge\extensions\sd-model-preview-xd\scripts\modelpreview.py", line 1126, in on_ui_tabs
    list_all_embeddings(),
  File "S:\StabilityMatrix\Data\Packages\stable-diffusion-webui-forge\extensions\sd-model-preview-xd\scripts\modelpreview.py", line 236, in list_all_embeddings
    sd_hijack.model_hijack.embedding_db.load_textual_inversion_embeddings()

AttributeError: module 'modules.sd_hijack' has no attribute 'model_hijack'
CurtisDS commented 1 month ago

What commit are you on for this extension? What commit of A111 are you running?

richardm1 commented 1 month ago

extension: fe568745 A1111 version: f1.0.2v1.10.1-previous-179-g002341af

Edit: just updated to f1.0.2v1.10.1-previous-191-g1802850e -- same error.

CurtisDS commented 1 month ago

Looks like you're using forge. And it looks like forge is missing the model_hijack variable in modules/sd_hijack.py. IDK whats going on there but you might want to open an issue with them. This extension is working for me in a1111 on the latest commit v1.10.1

Just took a quick look at their repo and the entire file is commented out. Try reverting back to a stable release.

There also appears to be an issue already open: https://github.com/lllyasviel/stable-diffusion-webui-forge/issues/966

wrathgoddess commented 1 month ago

Looks like you're using forge. And it looks like forge is missing the model_hijack variable in modules/sd_hijack.py. IDK whats going on there but you might want to open an issue with them. This extension is working for me in a1111 on the latest commit v1.10.1

Just took a quick look at their repo and the entire file is commented out. Try reverting back to a stable release.

There also appears to be an issue already open: lllyasviel/stable-diffusion-webui-forge#966

Screenshot 2024-08-08 200324 the file looks like this would removing theses fix it

CurtisDS commented 1 month ago

the file looks like this would removing theses fix it

Maybe... If you did remove the hashtags you would also have to make sure that the line of code is actually a line of code and was not intended as a comment. You could probably check previous commits and compare with those to see which is which. But there is probably a reason they commented out the file.

If you look at the current readme in forge:

WebUI Forge is under a week of major revision right now between 2024 Aug 1 and Aug 10. To join the test, just update to the latest unstable version.

Current Progress (2024 Aug 7): Backend Rewrite is 90% finished - remaining 48 hours to begin making it stable; remaining 72 hours to begin supporting many new things.

For downloading previous versions, see https://github.com/lllyasviel/stable-diffusion-webui-forge/discussions/849.

So I would just suggest downgrading to the last stable commit and use that for a while.

wrathgoddess commented 1 month ago

the file looks like this would removing theses fix it

Maybe... If you did remove the hashtags you would also have to make sure that the line of code is actually a line of code and was not intended as a comment. You could probably check previous commits and compare with those to see which is which. But there is probably a reason they commented out the file.

If you look at the current readme in forge:

WebUI Forge is under a week of major revision right now between 2024 Aug 1 and Aug 10. To join the test, just update to the latest unstable version. Current Progress (2024 Aug 7): Backend Rewrite is 90% finished - remaining 48 hours to begin making it stable; remaining 72 hours to begin supporting many new things. For downloading previous versions, see lllyasviel/stable-diffusion-webui-forge#849.

So I would just suggest downgrading to the last stable commit and use that for a while.

nvm update 4 hours ago fixes made for some extensions