Instructions to use lightx2v/Self-Forcing-NVFP4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use lightx2v/Self-Forcing-NVFP4 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("lightx2v/Self-Forcing-NVFP4", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Diffusion Single File
How to use lightx2v/Self-Forcing-NVFP4 with Diffusion Single File:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
comfyui fail
I have set the clip correctly, but I am getting the following error:
KSampler
mat1 and mat2 shapes cannot be multiplied (13770x1536 and 768x1536)
TIPS: If you have any "Load CLIP" or "*CLIP Loader" nodes in your workflow connected to this sampler node make sure the correct file(s) and type is selected.
γγγγγγ
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "E:\ComfyUI_portable_TE_v251207\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1787, in _call_impl
return forward_call(*args, **kwargs)
File "E:\ComfyUI_portable_TE_v251207\ComfyUI\comfy\ldm\wan\model.py", line 244, in forward
y = self.self_attn(
torch.addcmul(repeat_e(e[0], x), self.norm1(x), 1 + repeat_e(e[1], x)),
freqs, transformer_options=transformer_options)
File "E:\ComfyUI_portable_TE_v251207\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1776, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "E:\ComfyUI_portable_TE_v251207\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1787, in _call_impl
return forward_call(*args, **kwargs)
File "E:\ComfyUI_portable_TE_v251207\ComfyUI\comfy\ldm\wan\model.py", line 80, in forward
q = qkv_fn_q(x)
File "E:\ComfyUI_portable_TE_v251207\ComfyUI\comfy\ldm\wan\model.py", line 70, in qkv_fn_q
q = self.norm_q(self.q(x)).view(b, s, n, d)
~~~~~~^^^
File "E:\ComfyUI_portable_TE_v251207\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1776, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "E:\ComfyUI_portable_TE_v251207\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1787, in _call_impl
return forward_call(*args, **kwargs)
File "E:\ComfyUI_portable_TE_v251207\ComfyUI\comfy\ops.py", line 358, in forward
return self.forward_comfy_cast_weights(*args, **kwargs)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "E:\ComfyUI_portable_TE_v251207\ComfyUI\comfy\ops.py", line 351, in forward_comfy_cast_weights
x = torch.nn.functional.linear(input, weight, bias)
RuntimeError: mat1 and mat2 shapes cannot be multiplied (13770x1536 and 768x1536)
comfyui lumi batcher overwrite task done
Prompt executed in 0.31 seconds