./ComfyUI/models/diffusion_models./ComfyUI/models/text_encoders./ComfyUI/models/vae./ComfyUI/models/clip_visionpig is a lazy architecture for gguf node; it applies to all model, encoder and vae gguf file(s); if you try to run it in comfyui-gguf node, you might need to manually add pig in it's IMG_ARCH_LIST (under loader.py); easier than you edit the gguf file itself; btw, model architecture which compatible with comfyui-gguf, including wan, should work in gguf nodeimport torch
from transformers import UMT5EncoderModel
from diffusers import AutoencoderKLWan, WanVACEPipeline, WanVACETransformer3DModel, GGUFQuantizationConfig
from diffusers.schedulers.scheduling_unipc_multistep import UniPCMultistepScheduler
from diffusers.utils import export_to_video
model_path = "https://huggingface.co/calcuis/wan-gguf/blob/main/wan2.1-v5-vace-1.3b-q4_0.gguf"
transformer = WanVACETransformer3DModel.from_single_file(
model_path,
quantization_config=GGUFQuantizationConfig(compute_dtype=torch.bfloat16),
torch_dtype=torch.bfloat16,
)
text_encoder = UMT5EncoderModel.from_pretrained(
"chatpig/umt5xxl-encoder-gguf",
gguf_file="umt5xxl-encoder-q4_0.gguf",
torch_dtype=torch.bfloat16,
)
vae = AutoencoderKLWan.from_pretrained(
"callgg/wan-decoder",
subfolder="vae",
torch_dtype=torch.float32
)
pipe = WanVACEPipeline.from_pretrained(
"callgg/wan-decoder",
transformer=transformer,
text_encoder=text_encoder,
vae=vae,
torch_dtype=torch.bfloat16
)
flow_shift = 3.0
pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config, flow_shift=flow_shift)
pipe.enable_model_cpu_offload()
pipe.vae.enable_tiling()
prompt = "a pig moving quickly in a beautiful winter scenery nature trees sunset tracking camera"
negative_prompt = "blurry ugly bad"
output = pipe(
prompt=prompt,
negative_prompt=negative_prompt,
width=720,
height=480,
num_frames=57,
num_inference_steps=24,
guidance_scale=2.5,
conditioning_scale=0.0,
generator=torch.Generator().manual_seed(0),
).frames[0]
export_to_video(output, "output.mp4", fps=16)
ggc v2
f32 status (avoid triggering time/text embedding key error for inference usage)wan2.1-t2v-14b-f32-00001-of-00002.gguf 42 GBwan2.1-t2v-14b-f32-00002-of-00002.gguf 15 GBwan2.1-i2v-480p-14b-f32-00001-of-00004.gguf 17 GBwan2.1-i2v-480p-14b-f32-00002-of-00004.gguf 17 GBwan2.1-i2v-480p-14b-f32-00003-of-00004.gguf 17 GBwan2.1-i2v-480p-14b-f32-00004-of-00004.gguf 14 GBwan2.1-i2v-720p-14b-f32-00001-of-00004.gguf 17 GBwan2.1-i2v-720p-14b-f32-00002-of-00004.gguf 17 GBwan2.1-i2v-720p-14b-f32-00003-of-00004.gguf 17 GBwan2.1-i2v-720p-14b-f32-00004-of-00004.gguf 14 GBwan2.1-flf2v-720p-14b-f32-00001-of-00005.gguf 14 GBwan2.1-flf2v-720p-14b-f32-00002-of-00005.gguf 14 GBwan2.1-flf2v-720p-14b-f32-00003-of-00005.gguf 14 GBwan2.1-flf2v-720p-14b-f32-00004-of-00005.gguf 14 GB 9.0 GBt5xxl_um_fp16.safetensors 11 GBt5xxl_um_fp8_e4m3fn_scaled.safetensors 6.7 GBwan2.1_t2v_1.3b_fp32.safetensors 5.7 GBwan2.1_t2v_1.3b_fp16.safetensors 2.8 GBclip_vision_h_fp16.safetensors 1.3 GBclip_vision_h_fp8_e4m3fn.safetensors 632 MBwan_2.1_vae_fp8_e4m3fn.safetensors 127 MBwan2.1-flf2v-720p-14b-f32-00005-of-00005.ggufwan2.1-vace-14b-f32-00001-of-00002.gguf 37 GBwan2.1-vace-14b-f32-00002-of-00002.gguf 33 GBHave the files? Submit a torrent.
Submit a torrentHave the complete files and permission to share them? Replace the example folder path. The script checks the files, makes a torrent and submits its magnet and checksums. Keep your torrent client seeding. Get your community key from your settings, and read the script before running it.
curl -fsSL https://pirateface.co/package.sh | bash -s -- --repo klpostive/wan-gguf ./model-folderComfy-Org/Wan_2.1_ComfyUI_repackaged