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

An exception after update and now SDXL isn't working, workload has not been installed. #1423

Closed
GeminiSquishGames opened this issue Nov 20, 2024 · 11 comments

Comments

@GeminiSquishGames
Copy link

It was working fine until the update. But now this.

Exception:

KeyError
Python 3.10.7: D:\Graphics\Krita (x64)\bin\krita.exe
Tue Nov 19 20:18:55 2024

A problem occurred in a Python script.  Here is the sequence of
function calls leading up to the error, in the order they occurred.

 C:\Users\lintp\AppData\Roaming\krita\pykrita\ai_diffusion\ui\settings.py in show(self=<ai_diffusion.ui.settings.SettingsDialog object>, style=False)
  854 
  855     def show(self, style: Optional[Style] = None):
  856         self.read()
  857         self.connection.update_ui()
  858         super().show()
self = <ai_diffusion.ui.settings.SettingsDialog object>
self.read = <bound method SettingsDialog.read of <ai_diffusion.ui.settings.SettingsDialog object>>

 C:\Users\lintp\AppData\Roaming\krita\pykrita\ai_diffusion\ui\settings.py in read(self=<ai_diffusion.ui.settings.SettingsDialog object>)
  841 
  842     def read(self):
  843         self.connection.read()
  844         self.styles.read()
  845         self.diffusion.read()
self = <ai_diffusion.ui.settings.SettingsDialog object>
self.connection = <ai_diffusion.ui.settings.ConnectionSettings object>
self.connection.read = <bound method SettingsTab.read of <ai_diffusion.ui.settings.ConnectionSettings object>>

 C:\Users\lintp\AppData\Roaming\krita\pykrita\ai_diffusion\ui\settings_widgets.py in read(self=<ai_diffusion.ui.settings.ConnectionSettings object>)
  436             for name, widget in self._widgets.items():
  437                 widget.value = getattr(settings, name)
  438             self._read()
  439 
  440     def _write(self):
self = <ai_diffusion.ui.settings.ConnectionSettings object>
self._read = <bound method ConnectionSettings._read of <ai_diffusion.ui.settings.ConnectionSettings object>>

 C:\Users\lintp\AppData\Roaming\krita\pykrita\ai_diffusion\ui\settings.py in _read(self=<ai_diffusion.ui.settings.ConnectionSettings object>)
  308 
  309     def _read(self):
  310         self.server_mode = settings.server_mode
  311         self._server_url.setText(settings.server_url)
  312 
self = <ai_diffusion.ui.settings.ConnectionSettings object>
self.server_mode = <ServerMode.undefined: -1>
global settings = <ai_diffusion.settings.Settings object>
settings.server_mode = <ServerMode.undefined: -1>

 C:\Users\lintp\AppData\Roaming\krita\pykrita\ai_diffusion\ui\settings.py in server_mode(self=<ai_diffusion.ui.settings.ConnectionSettings object>, mode=<ServerMode.undefined: -1>)
  297             self._server_managed.setChecked(mode is ServerMode.managed)
  298             self._server_external.setChecked(mode is ServerMode.external)
  299         widget = {
  300             ServerMode.cloud: self._cloud_widget,
  301             ServerMode.managed: self._server_widget,
widget undefined
global ServerMode = <enum 'ServerMode'>
ServerMode.cloud = <ServerMode.cloud: 2>
self = <ai_diffusion.ui.settings.ConnectionSettings object>
self._cloud_widget = <ai_diffusion.ui.settings.CloudWidget object>
ServerMode.managed = <ServerMode.managed: 0>
self._server_widget = <ai_diffusion.ui.server.ServerWidget object>
ServerMode.external = <ServerMode.external: 1>
self._connection_widget = <PyQt5.QtWidgets.QWidget object>
mode = <ServerMode.undefined: -1>
KeyError: <ServerMode.undefined: -1>
    __cause__ = None
    __class__ = <class 'KeyError'>
    __context__ = None
    __delattr__ = <method-wrapper '__delattr__' of KeyError object>
    __dict__ = {}
    __dir__ = <built-in method __dir__ of KeyError object>
    __doc__ = 'Mapping key not found.'
    __eq__ = <method-wrapper '__eq__' of KeyError object>
    __format__ = <built-in method __format__ of KeyError object>
    __ge__ = <method-wrapper '__ge__' of KeyError object>
    __getattribute__ = <method-wrapper '__getattribute__' of KeyError object>
    __gt__ = <method-wrapper '__gt__' of KeyError object>
    __hash__ = <method-wrapper '__hash__' of KeyError object>
    __init__ = <method-wrapper '__init__' of KeyError object>
    __init_subclass__ = <built-in method __init_subclass__ of type object>
    __le__ = <method-wrapper '__le__' of KeyError object>
    __lt__ = <method-wrapper '__lt__' of KeyError object>
    __ne__ = <method-wrapper '__ne__' of KeyError object>
    __new__ = <built-in method __new__ of type object>
    __reduce__ = <built-in method __reduce__ of KeyError object>
    __reduce_ex__ = <built-in method __reduce_ex__ of KeyError object>
    __repr__ = <method-wrapper '__repr__' of KeyError object>
    __setattr__ = <method-wrapper '__setattr__' of KeyError object>
    __setstate__ = <built-in method __setstate__ of KeyError object>
    __sizeof__ = <built-in method __sizeof__ of KeyError object>
    __str__ = <method-wrapper '__str__' of KeyError object>
    __subclasshook__ = <built-in method __subclasshook__ of type object>
    __suppress_context__ = False
    __traceback__ = <traceback object>
    args = (<ServerMode.undefined: -1>,)
    with_traceback = <built-in method with_traceback of KeyError object>

The above is a description of an error in a Python program.  Here is
the original traceback:

Traceback (most recent call last):
  File "C:\Users\lintp\AppData\Roaming\krita\pykrita\ai_diffusion\ui\settings.py", line 856, in show
    self.read()
  File "C:\Users\lintp\AppData\Roaming\krita\pykrita\ai_diffusion\ui\settings.py", line 843, in read
    self.connection.read()
  File "C:\Users\lintp\AppData\Roaming\krita\pykrita\ai_diffusion\ui\settings_widgets.py", line 438, in read
    self._read()
  File "C:\Users\lintp\AppData\Roaming\krita\pykrita\ai_diffusion\ui\settings.py", line 310, in _read
    self.server_mode = settings.server_mode
  File "C:\Users\lintp\AppData\Roaming\krita\pykrita\ai_diffusion\ui\settings.py", line 299, in server_mode
    widget = {
KeyError: <ServerMode.undefined: -1>

And some of this:

2024-11-19 20:18:40,477 INFO Loaded 11 sampler presets from C:\Users\lintp\AppData\Roaming\krita\pykrita\ai_diffusion\presets\samplers.json
2024-11-19 20:18:40,637 INFO Extension initialized, Version: 1.28.1, Python: 3.10.7 (tags/v3.10.7:6cc6b13, Sep  5 2022, 14:08:36) [MSC v.1933 64 bit (AMD64)]
2024-11-19 20:18:40,892 INFO Checking for latest plugin version at https://api.interstice.cloud
2024-11-19 20:18:44,049 INFO Connecting to http://127.0.0.1:8188
2024-11-19 20:18:44,295 INFO Plugin is up to date!
2024-11-19 20:18:49,233 INFO Found Text Encoder model clip_l for All: clip_l.safetensors
2024-11-19 20:18:49,234 INFO Optional Text Encoder model clip_g for All not found (search path: clip_g)
2024-11-19 20:18:49,234 INFO Found Text Encoder model t5 for All: t5xxl_fp16.safetensors
2024-11-19 20:18:49,239 INFO Found Text Encoder model clip_l for All: clip_l.safetensors
2024-11-19 20:18:49,239 INFO Optional Text Encoder model clip_g for All not found (search path: clip_g)
2024-11-19 20:18:49,240 INFO Found Text Encoder model t5 for All: t5xxl_fp16.safetensors
2024-11-19 20:18:49,240 INFO Optional Image Encoder (VAE) model default for SD 1.5 not found (search path: vae-ft-mse-840000-ema)
2024-11-19 20:18:49,240 INFO Found Image Encoder (VAE) model default for SD XL: sdxl_vae.safetensors
2024-11-19 20:18:49,240 INFO Found Image Encoder (VAE) model default for Flux: ae.safetensors
2024-11-19 20:18:49,241 INFO Found ControlNet model inpaint for SD 1.5: ControlNet\control_v11p_sd15_inpaint.pth
2024-11-19 20:18:49,241 INFO Optional ControlNet model inpaint for Flux not found (search path: flux.1-dev-controlnet-inpaint)
2024-11-19 20:18:49,242 INFO Optional ControlNet model universal for SD XL not found (search path: union-sdxl, xinsirunion)
2024-11-19 20:18:49,242 INFO Found ControlNet model scribble for SD 1.5: ControlNet\control_v11p_sd15_scribble.pth
2024-11-19 20:18:49,243 INFO Found ControlNet model scribble for SD XL: ControlNet\sai_xl_sketch_128lora.safetensors
2024-11-19 20:18:49,243 INFO Found ControlNet model line_art for SD 1.5: ControlNet\control_v11p_sd15_lineart.pth
2024-11-19 20:18:49,244 INFO Found ControlNet model line_art for SD XL: ControlNet\sai_xl_sketch_128lora.safetensors
2024-11-19 20:18:49,244 INFO Optional ControlNet model line_art for Flux not found (search path: mistoline_flux)
2024-11-19 20:18:49,245 INFO Found ControlNet model soft_edge for SD 1.5: ControlNet\control_v11p_sd15_softedge.pth
2024-11-19 20:18:49,245 INFO Optional ControlNet model soft_edge for SD XL not found (search path: mistoline_fp16, mistoline_rank, xinsirscribble, scribble-sdxl)
2024-11-19 20:18:49,246 INFO Optional ControlNet model soft_edge for Flux not found (search path: mistoline_flux)
2024-11-19 20:18:49,246 INFO Found ControlNet model canny_edge for SD 1.5: ControlNet\control_v11p_sd15_canny.pth
2024-11-19 20:18:49,247 INFO Found ControlNet model canny_edge for SD XL: ControlNet\sai_xl_canny_128lora.safetensors
2024-11-19 20:18:49,247 INFO Optional ControlNet model canny_edge for Flux not found (search path: flux-canny, mistoline_flux)
2024-11-19 20:18:49,248 INFO Found ControlNet model depth for SD 1.5: ControlNet\control_v11f1p_sd15_depth.pth
2024-11-19 20:18:49,248 INFO Found ControlNet model depth for SD XL: ControlNet\sai_xl_depth_128lora.safetensors
2024-11-19 20:18:49,248 INFO Optional ControlNet model depth for Flux not found (search path: flux-depth)
2024-11-19 20:18:49,249 INFO Found ControlNet model normal for SD 1.5: ControlNet\control_v11p_sd15_normalbae.pth
2024-11-19 20:18:49,249 INFO Found ControlNet model pose for SD 1.5: ControlNet\control_v11p_sd15_openpose.pth
2024-11-19 20:18:49,250 INFO Found ControlNet model pose for SD XL: T2IAdapter\t2i-adapter-openpose-sdxl-1.0\diffusion_pytorch_model.safetensors
2024-11-19 20:18:49,250 INFO Found ControlNet model segmentation for SD 1.5: ControlNet\control_v11p_sd15_seg.pth
2024-11-19 20:18:49,251 INFO Optional ControlNet model segmentation for SD XL not found (search path: sdxl_segmentation_ade20k_controlnet)
2024-11-19 20:18:49,251 INFO Found ControlNet model blur for SD 1.5: ControlNet\control_v11f1e_sd15_tile.pth
2024-11-19 20:18:49,252 INFO Optional ControlNet model blur for SD XL not found (search path: xinsirtile, tile-sdxl, ttplanetsdxlcontrolnet, ttplanet_sdxl_controlnet_tile_realistic, ttplanet_controlnet_tile_realistic)
2024-11-19 20:18:49,252 INFO Optional ControlNet model blur for Flux not found (search path: flux.1-dev-controlnet-upscale)
2024-11-19 20:18:49,252 INFO Optional ControlNet model stencil for SD 1.5 not found (search path: control_v1p_sd15_qrcode_monster)
2024-11-19 20:18:49,253 INFO Optional ControlNet model stencil for SD XL not found (search path: sdxl_qrcode_monster)
2024-11-19 20:18:49,253 INFO Optional ControlNet model hands for SD 1.5 not found (search path: control_sd15_inpaint_depth_hand)
2024-11-19 20:18:49,254 INFO Found ControlNet model hands for SD XL: ControlNet\sai_xl_depth_128lora.safetensors
2024-11-19 20:18:49,254 INFO Found CLIP Vision model ip_adapter for All: clip-vision_vit-h.safetensors
2024-11-19 20:18:49,254 INFO Found IP-Adapter model reference for SD 1.5: sd15\ip-adapter_sd15.safetensors
2024-11-19 20:18:49,254 INFO Found IP-Adapter model reference for SD XL: base\ip-adapter_sdxl_vit-h.safetensors
2024-11-19 20:18:49,255 INFO Found IP-Adapter model face for SD 1.5: sd15\ip-adapter-faceid-plusv2_sd15.bin
2024-11-19 20:18:49,255 INFO Optional IP-Adapter model face for SD XL not found (search path: ip-adapter-faceid-plusv2_sdxl, ip-adapter-faceid_sdxl)
2024-11-19 20:18:49,255 INFO Found Upscale model default for All: 4x_NMKD-Superscale-SP_178000_G.pth
2024-11-19 20:18:49,256 INFO Found Upscale model fast_2x for All: OmniSR_X2_DIV2K.safetensors
2024-11-19 20:18:49,256 INFO Found Upscale model fast_3x for All: OmniSR_X3_DIV2K.safetensors
2024-11-19 20:18:49,256 INFO Found Upscale model fast_4x for All: OmniSR_X4_DIV2K.safetensors
2024-11-19 20:18:49,256 INFO Found Inpaint model default for All: MAT_Places512_G_fp16.safetensors
2024-11-19 20:18:49,257 INFO Found Inpaint model fooocus_head for SD XL: fooocus_inpaint_head.pth
2024-11-19 20:18:49,257 WARNING Missing Inpaint model fooocus_patch for SD XL
2024-11-19 20:18:49,257 INFO -> No model matches search paths: inpaint_v26.fooocus
2024-11-19 20:18:49,257 INFO -> Available models: mat_places512_g_fp16.safetensors, places_512_fulldata_g.pth, big-lama.pt, fooocus_inpaint_head.pth, fooocus_lama.safetensors
2024-11-19 20:18:49,258 INFO Found LoRA model hyper for SD 1.5: Hyper-SD15-8steps-CFG-lora.safetensors
2024-11-19 20:18:49,259 INFO Found LoRA model hyper for SD XL: Hyper-SDXL-8steps-CFG-lora.safetensors
2024-11-19 20:18:49,260 INFO Found LoRA model lcm for SD 1.5: lcm\SD1.5\pytorch_lora_weights.safetensors
2024-11-19 20:18:49,261 INFO Found LoRA model lcm for SD XL: lcm-lora-sdxl.safetensors
2024-11-19 20:18:49,262 INFO Found LoRA model face for SD 1.5: ip-adapter-faceid-plusv2_sd15_lora.safetensors
2024-11-19 20:18:49,263 INFO Found LoRA model face for SD XL: ip-adapter-faceid-plusv2_sdxl_lora.safetensors
2024-11-19 20:18:49,264 INFO Found LoRA model lightning for SD XL: sdxl_lightning_8step_lora.safetensors
2024-11-19 20:18:55,411 INFO GGUF support: 1 models found.
2024-11-19 20:18:55,412 INFO SD 1.5: supported
2024-11-19 20:18:55,412 INFO SD XL: missing 1 models
2024-11-19 20:18:55,412 INFO SD 3: missing 1 models
2024-11-19 20:18:55,413 INFO Flux: supported

🤷‍♂️
My head hurts and I'm going to bed.

@Acly
Copy link
Owner

Acly commented Nov 21, 2024

2024-11-19 20:18:49,257 WARNING Missing Inpaint model fooocus_patch for SD XL
2024-11-19 20:18:49,257 INFO -> No model matches search paths: inpaint_v26.fooocus

It can't find inpaint_v26.fooocus.patch, is this managed or custom ComfyUI install? It seems to be a common issue for various reaons

@GeminiSquishGames
Copy link
Author

GeminiSquishGames commented Nov 21, 2024

It is custom and installed/updated through Stability Matrix. Looked at #872,#22,#66, I have the inpaint_v26.fooocus.patch file in the models/inpaint but also don't have any of the ComfyUI Fooocus Custom Nodes going on... but I have been trying to get AIGODLIKE's Blender Extention and nodes to work, being the most recent thing I've changed, and it tries to put it's files in but has an access violation on my system... so I'll probably look there for weirdness next.

Seems like disabling and re-enabling [ComfyUI Inpaint Nodes] was all it needed, thought I had tried it the other night but found out trying to restart ComfyUI server from the Manager bugs Stability Matrix's server so that probably prevented it from loading properly the other night when I found that bug. (Seems to start another server without StabMat knowing it internally and sometimes trying to start it again after the call to restart from ComfyUI itself, then sometimes makes another server on port 8189. Just incase anyone runs into the issue in StabMat, you have to restart from their console always and restart the whole app if it bugs on you to clear the duplicate server problems.)

@SytanSD
Copy link

SytanSD commented Nov 26, 2024

I am getting this when trying to load any SDXL model now. Never was an issue before. All my workflows and entirely useless now, and reinstalling or updating isn't working. I am on a local install of comfy that works for SD1.5 and flux, but not SDXL for whatever reason.
image

@GeminiSquishGames
Copy link
Author

@SytanSD I was still able to use SDXL and SD3 in the ComfyUI at least, it was just the Krita plugin not seeing the .patch file. I had to do that for Acly's node, specifically in the ComfyUI Manager—reinstall, that is or simply run with it disabled, restart, then reinable, and again restart. Krita plugin worked after that. However, I also noticed in the other issues I put in my last post that if you have other Fooocus-based nodes, they can conflict. If you search for Fooocus in the manager, make sure this is the only one installed. Not sure if that helps as you stated reinstalling wasn't working, wasn't sure if you had tried scouring your manager for conflicts in ComfyUI itself or not.

@SytanSD
Copy link

SytanSD commented Nov 28, 2024

@GeminiSquishGames Thank you! I will be trying this. For me, I only had the issue with SDXL. It worked for 1.5, SD3 and Flux just fine. I can still use them all in normal ComfyUI, and I even tried uninstalling said nodes and reinstalling, but I will for sure try again. I really would like to get SDXL working, as I just found a model I seriously enjoy that is based off SDXL 😅

@SytanSD
Copy link

SytanSD commented Dec 1, 2024

@Acly @GeminiSquishGames I have tried all of the aforementioned fixes and solutions, and none of them have worked or made any progress for me. I fully uninstalled the nodes, installed them by hand, disabled them, updated Comfy, Krita, and the Nodes, and did full PC restarts. I have no idea what to do. No matter what I do, it continues to pop this error:
image

Any help would be greatly appreciated

@Acly
Copy link
Owner

Acly commented Dec 1, 2024

Please check client.log, it will point out which model is missing.

@SytanSD
Copy link

SytanSD commented Dec 1, 2024

@Acly The log I have is about 110k words long 😓

I was able to look around, and this was the only thing I saw that mentioned anything specific about things that are missing or supported/not supported:
image
All of the files that say they are missing also say they are optional, so I am confused. Maybe I am missing something specific? I also noticed its still looking for SDXL LCM, when that's not a model on the required install list. Any information is greatly appreciated, I look forward to getting this all working so I can go back to absolutely loving AI Diffusion 😉

@SytanSD
Copy link

SytanSD commented Dec 1, 2024

After looking more, I realized the file hadn't fully saved and had the top cut off. I just saw this when I re-opened it. I am assuming this is more along the lines of what you are looking for @Acly
image
I am not sure why any of this would be missing when SDXL works fine on its own, and was working fine before with the plugin. Please let me know if I can provide anything additional. I have no idea what has happened to all of this

@Acly
Copy link
Owner

Acly commented Dec 1, 2024

@Acly The log I have is about 110k words long 😓

Well it's a log, entries are chronological, so usually you want to look at the bottom for the newest stuff.

Optional stuff you can ignore (it's optional), but it calls out 3 models which are missing. I have no idea what has happened either, but there is a clear path to fix it. Check for the missing files (it's the bottom 3 in the SD XL list here), download them if needed.

@BlueOnyxTeam
Copy link

For anyone getting the SDXL error.
The problem likely involves the fooocus_patch Filename.

The file downloaded is named "inpaint_v26.fooocus.patch"
However Krita AI is looking for "inpaint_v26.fooocus"

I just made a backup, and renamed it, and it's allowing me to use SDXL models again.

@Acly Acly closed this as completed Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants