Skip to content

Converted DFloat11 shards into safetensors for ComfyUI #33

@jaxiez

Description

@jaxiez

Hi,

I have used a script to convert these files (i.e. Wan2.2-T2V-A14B-DF11) into a single safetensors file in an attempt to use with the DFloat11 node in ComfyUI. However, there is an error "DFloat11ModelLoader'NoneType' object has no attribute 'set_inference_dtype'! when runningComfyUI.

Pleas help. How do I go about using these DF11 files in ComfyUI?

Thanks.
Jack.

My Script for shell command:

E:\ComfyUI_windows_portable\python_embeded\python.exe -c "import os,glob,json; from safetensors import safe_open; from safetensors.torch import save_file; p=r'D:\dfloat11-files\Wan2.2-T2V-A14B-DF11'; out='Wan2.2-T2V-A14B-DF11.safetensors'; os.chdir(p); idx=glob.glob('.safetensors.index.json'); files=sorted({s for s in (json.load(open(idx[0],'r',encoding='utf-8'))['weight_map'].values())}) if idx else sorted(glob.glob('.safetensors')); t={}; [ (lambda sf: [t.setdefault(k, sf.get_tensor(k)) for k in sf.keys()]) (safe_open(f, framework='pt', device='cpu')) for f in files if f!=out ]; save_file(t,out); print('Wrote:', os.path.join(p,out))"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions