Error(s) in loading state_dict for Flux

#2
by successage - opened
!!! Exception during processing !!! Error(s) in loading state_dict for Flux:
        size mismatch for img_in.weight: copying a param with shape torch.Size([3072, 384]) from checkpoint, the shape in current model is torch.Size([3072, 64]).
Traceback (most recent call last):
  File "/root/autodl-tmp/ComfyUI/execution.py", line 323, in execute
    output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
  File "/root/autodl-tmp/ComfyUI/execution.py", line 198, in get_output_data
    return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
  File "/root/autodl-tmp/ComfyUI/execution.py", line 169, in _map_node_over_list
    process_inputs(input_dict, i)
  File "/root/autodl-tmp/ComfyUI/execution.py", line 158, in process_inputs
    results.append(getattr(obj, func)(**inputs))
  File "/root/autodl-tmp/ComfyUI/nodes.py", line 882, in load_unet
    model = comfy.sd.load_diffusion_model(unet_path, model_options=model_options)
  File "/root/autodl-tmp/ComfyUI/comfy/sd.py", line 700, in load_diffusion_model
    model = load_diffusion_model_state_dict(sd, model_options=model_options)
  File "/root/autodl-tmp/ComfyUI/comfy/sd.py", line 691, in load_diffusion_model_state_dict
    model.load_model_weights(new_sd, "")
  File "/root/autodl-tmp/ComfyUI/comfy/model_base.py", line 222, in load_model_weights
    m, u = self.diffusion_model.load_state_dict(to_load, strict=False)
  File "/root/autodl-tmp/vms/comfyui/lib/python3.10/site-packages/torch/nn/modules/module.py", line 2215, in load_state_dict
    raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for Flux:
        size mismatch for img_in.weight: copying a param with shape torch.Size([3072, 384]) from checkpoint, the shape in current model is torch.Size([3072, 64]).

Maybe...You need comfyUI update.

Maybe...You need comfyUI update.

You sure? I have the same problem...

yes, just update comfyui

yes, just update comfyui

That' works, great!

works thanks

Didn't work for me. I already updated my comfyUI to the latest. I don't think updating is the way.

You are super. I didn't even realize that I just needed to update!

Updating Comfyui has no effect. Tested on two different systems.

anyone find the solution for the same issue?

Sign up or log in to comment