Skip to content
Python

added nvfp4 Wan 2.1 i2V & t2v 1.3B

deepbeepmeepbdb41b6d7e65
diff --git a/defaults/alpha2_sf.json b/defaults/alpha2_sf.json
index e2e2430..3b48d91 100644
--- a/defaults/alpha2_sf.json
+++ b/defaults/alpha2_sf.json
@@ -15,3 +15,4 @@
"guidance_scale": 1,
"flow_shift": 3
}
+
\ No newline at end of file
diff --git a/defaults/i2v_nvfp4.json b/defaults/i2v_nvfp4.json
new file mode 100644
index 0000000..a5f3d5c
--- /dev/null
+++ b/defaults/i2v_nvfp4.json
@@ -0,0 +1,15 @@
+{
+ "model":
+ {
+ "name": "Wan2.1 Image2video 480p 14B NVFP4 Lightx2v 4-step",
+ "architecture": "i2v",
+ "description": "NVFP4-quantized Lightx2v 4-step finetune for Wan2.1 I2V 480p.",
+ "URLs": [
+ "https://huggingface.co/DeepBeepMeep/Wan2.1/resolve/main/wan2.1_i2v_480p_nvfp4_lightx2v_4step.safetensors"
+ ]
+ },
+ "guidance_scale" : 1,
+ "num_inference_steps": 4,
+ "sampler_solver": "euler",
+ "flow_shift": 1
+}
diff --git a/defaults/qwen_image_edit_plus_20B_nunchaku_r128_int4.json b/defaults/qwen_image_edit_plus_20B_nunchaku_r128_int4.json
index fbfe928..5f79b1d 100644
--- a/defaults/qwen_image_edit_plus_20B_nunchaku_r128_int4.json
+++ b/defaults/qwen_image_edit_plus_20B_nunchaku_r128_int4.json
@@ -1,6 +1,6 @@
{
"model": {
- "name": "Qwen Image Edit Nunchaku INT4 r128 (2509) 20B",
+ "name": "Qwen Image Edit Plus (2509) Nunchaku INT4 r128 20B",
"architecture": "qwen_image_edit_plus_20B",
"description": "Nunchaku SVDQ INT4 weights for Qwen Image Edit 2509 20B.",
"URLs": [
diff --git a/defaults/scail.json b/defaults/scail.json
index 0950f74..0184372 100644
--- a/defaults/scail.json
+++ b/defaults/scail.json
@@ -1,6 +1,6 @@
{
"model": {
- "name": "SCAIL 14B Preview",
+ "name": "SCAIL Preview 14B",
"architecture": "scail",
"description": "SCAIL: Studio-Grade Character Animation. Animates reference image using driving video motion with 3D-consistent pose transfer. Uses NLFPose for accurate 3D skeleton extraction.",
"URLs": [
diff --git a/defaults/t2v_1.3B_nvfp4.json b/defaults/t2v_1.3B_nvfp4.json
new file mode 100644
index 0000000..647ebc0
--- /dev/null
+++ b/defaults/t2v_1.3B_nvfp4.json
@@ -0,0 +1,15 @@
+{
+ "model":
+ {
+ "name": "Wan2.1 Text2video NVFP4 Lightx2v 4-step 1.3B",
+ "architecture": "t2v_1.3B",
+ "description": "NVFP4-quantized Lightx2v 4-step finetune for Wan2.1 T2V 1.3B.",
+ "URLs": [
+ "https://huggingface.co/DeepBeepMeep/Wan2.1/resolve/main/wan2.1_t2v_1_3b_nvfp4_lightx2v_4step.safetensors"
+ ]
+ },
+ "guidance_scale" : 1,
+ "sampler_solver": "euler",
+ "num_inference_steps": 4,
+ "flow_shift": 1
+}
diff --git a/models/wan/any2video.py b/models/wan/any2video.py
index b6372c5..cb4947b 100644
--- a/models/wan/any2video.py
+++ b/models/wan/any2video.py
@@ -445,20 +445,7 @@ class WanAny2V:
):
model_def = self.model_def
- distill_steps = None
- distill_debug = os.getenv("WAN_DISTILL_DEBUG", "0").lower() not in ("0", "false", "no")
- if model_def is not None and model_def.get("distill_scheduler", False):
- distill_steps = model_def.get("denoising_step_list", None)
- if distill_steps is None:
- raise ValueError("distill_scheduler requires denoising_step_list in model definition")
- sample_solver = "distill"
- sampling_steps = len(distill_steps)
- if model_def.get("sample_shift", None) is not None:
- shift = model_def["sample_shift"]
- if distill_debug:
- print(f"Wan distill scheduler enabled: steps={distill_steps} shift={shift}")
-
- distill_sigmas = None
+
if sample_solver =="euler":
# prepare timesteps
timesteps = list(np.linspace(self.num_timesteps, 1, sampling_steps, dtype=np.float32))
@@ -468,19 +455,6 @@ class WanAny2V:
timesteps = [timestep_transform(t, shift=shift, num_timesteps=self.num_timesteps) for t in timesteps][:-1]
timesteps = torch.tensor(timesteps)
sample_scheduler = None
- elif sample_solver == "distill":
- if distill_steps is None:
- raise ValueError("distill scheduler requires denoising_step_list")
- num_train_timesteps = 1000
- sigmas = torch.linspace(1.0, 0.0, num_train_timesteps + 1, device=self.device)[:-1]
- sigmas = shift * sigmas / (1 + (shift - 1) * sigmas)
- timesteps = sigmas * num_train_timesteps
- denoise_indices = [num_train_timesteps - int(x) for x in distill_steps]
- timesteps = timesteps[denoise_indices].to(self.device)
- distill_sigmas = sigmas[denoise_indices].to("cpu")
- if distill_debug:
- print(f"Wan distill timesteps: {timesteps.tolist()} sigmas: {distill_sigmas.tolist()}")
- sample_scheduler = None
elif sample_solver == 'causvid':
sample_scheduler = FlowMatchScheduler(num_inference_steps=sampling_steps, shift=shift, sigma_min=0, extra_one_step=True)
timesteps = torch.tensor([1000, 934, 862, 756, 603, 410, 250, 140, 74])[:sampling_steps].to(self.device)