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

Invocation failed - Missing key model full_key: model object_type=dict #137

Open
MBRGA opened this issue Jan 28, 2024 · 3 comments
Open

Comments

@MBRGA
Copy link

MBRGA commented Jan 28, 2024

I'm having an issue where I can't run the tool against certain checkpoints. I have pointed Enfugue to my existing Automatic1111 install directory, and the models are being picked up correctly. The error is occurring while loading the checkpoint.

That said, I can only run some of them. I can use v1-5-pruned-emaonly.ckpt and sd_xl_base_1.0_fp16_vae.safetensors, but I can't use sd_xl_base_1.0.safetensors or juggernautXL_v7Rundiffusion.safetensors, for example. All of these checkpoints were downloaded before installing Enfugue, and they run fine using Automatic1111.

I haven't been able to find any references online at all to the error message.

The stack trace is as follows:

Traceback (most recent call last):
  File "enfugue\diffusion\process.py", line 199, in run

    response["result"] = self.handle(instruction_id, instruction_action, instruction_payload)

  File "enfugue\diffusion\process.py", line 260, in handle

    return self.execute_diffusion_plan(

  File "enfugue\diffusion\process.py", line 304, in execute_diffusion_plan

    return plan.execute(

  File "enfugue\diffusion\invocation\layers.py", line 1496, in execute

    images, nsfw = self.execute_inference(

  File "enfugue\diffusion\invocation\layers.py", line 1726, in execute_inference

    result = pipeline(

  File "enfugue\diffusion\manager.py", line 5400, in __call__

    pipe = self.pipeline # type: ignore

  File "enfugue\diffusion\manager.py", line 3414, in pipeline

    pipeline = self.pipeline_class.from_ckpt(self.model, **kwargs)

  File "enfugue\diffusion\pipeline.py", line 427, in from_ckpt

    if "unet_config" in original_config["model"]["params"]:  # type: ignore

  File "omegaconf\dictconfig.py", line 373, in __getitem__

  File "omegaconf\base.py", line 190, in _format_and_raise

  File "omegaconf\_utils.py", line 818, in format_and_raise

  File "omegaconf\_utils.py", line 716, in _raise

  File "omegaconf\dictconfig.py", line 367, in __getitem__

  File "omegaconf\dictconfig.py", line 438, in _get_impl

  File "omegaconf\dictconfig.py", line 470, in _get_node

omegaconf.errors.ConfigKeyError: Missing key model

    full_key: model

    object_type=dict

@painebenjamin
Copy link
Owner

Hello @MBRGA, thank you for the report!

Is there a configuration file with the same name as those checkpoints? For example, is there a juggernautXL_v7Rundiffusion.yaml, juggernautXL_v7Rundiffusion.yml or juggernautXL_v7Rundiffusion.json alongside those checkpoints in your Automatic installation? If so, could you please let me see one of them?

@idoganel
Copy link

I had this exact problem! I didn't understand why it was happening till now, but I think I finally understood what was causing it, inside the main models folder I had several subfolders to sort the different models (1.5, XL, my training) and the software doesn't know how to search within these subfolders, models that I placed under The main folder works fine.
So if the models are not in the folder you specified during the installation, this may be what causes it.

@MBRGA
Copy link
Author

MBRGA commented Jan 31, 2024

@painebenjamin thanks for the response. See attached for Juggernaut and SDXL config files.
juggernautXL_v7Rundiffusion.json
sd_xl_base_1.0.json
Looks like actually the ones that are working are the ones without config files.

@idoganel Definitely not the problem in my case - I don't have any subfolders!

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

3 participants