-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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
When using .ckpt, "comfy/sd.py": KeyError: 'state_dict' #1
Comments
Should be fixed now. |
Well holy cow that was a fast fix. Indeed, my broken models work again. I wonder:
|
You can switch to another branch then: git pull https://github.com/comfyanonymous/ComfyUI other_branch I don't think this model format is ok because it makes them incompatible with upstream SD: |
* Add inference tests * Clean up * Rename test graph file * Add readme for tests * Separate server fixture * test file name change * Assert images are generated * Clean up comments * Add __init__.py so tests can run with command line `pytest` * Fix command line args for pytest * Loop all samplers/schedulers in test_inference.py * Ci quality workflows compare (#1) * Add image comparison tests * Comparison tests do not pass with empty metadata * Ensure tests are run in correct order * Save image files with test name * Update tests readme * Reduce step counts in tests to ~halve runtime * Ci quality workflows build (#2) * Add build test github workflow
* Add inference tests * Clean up * Rename test graph file * Add readme for tests * Separate server fixture * test file name change * Assert images are generated * Clean up comments * Add __init__.py so tests can run with command line `pytest` * Fix command line args for pytest * Loop all samplers/schedulers in test_inference.py * Ci quality workflows compare (comfyanonymous#1) * Add image comparison tests * Comparison tests do not pass with empty metadata * Ensure tests are run in correct order * Save image files with test name * Update tests readme * Reduce step counts in tests to ~halve runtime * Ci quality workflows build (comfyanonymous#2) * Add build test github workflow
…pping Add command line option for devbox port mapping
Update custom-node-list.json
This will probably be a long-term issue others encounter and can serve as a convenient reference. It might not be a ComfyUI issue at all. tl;dr Running the error'ing model through any model merger or converter (such as WebUI's) fixes the issue, see below for details.
When using some models, but not others, seemingly only model merges created months ago in WebUI, the following error occurs:
A reminder, the code for
pl_sd
is...... and as the error says,
ckpt
andckpt_path
are certainly correct.This error is resolved by entering WebUI and running either of the following, after which ComfyUI can use the model. FP16 and Pruning are not necessary, but just provided as examples (as they are now the default used in WebUI's model merge utility):
It seems the offending models were made with PyTorch 12.x, and both WebUI and ComfyUI are running on PyTorch 13.1. WebUI can read these (malformed?) ckpt files, but ComfyUI cannot.
EDIT: This seems to be a common problem with a simple compatibility fix:
The text was updated successfully, but these errors were encountered: