GiorgioV commited on
Commit
68ab12f
·
verified ·
1 Parent(s): 154640a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -19,19 +19,19 @@ import aoti
19
 
20
  MODEL_ID = "Wan-AI/Wan2.2-I2V-A14B-Diffusers"
21
 
22
- MAX_DIM = 640
23
  MIN_DIM = 480
24
  SQUARE_DIM = 640
25
  MULTIPLE_OF = 16
26
 
27
  MAX_SEED = np.iinfo(np.int32).max
28
 
29
- FIXED_FPS = 24
30
- MIN_FRAMES_MODEL = 24
31
- MAX_FRAMES_MODEL = 120
32
 
33
  MIN_DURATION = round(MIN_FRAMES_MODEL/FIXED_FPS,1)
34
- MAX_DURATION = 5
35
 
36
 
37
  pipe = WanImageToVideoPipeline.from_pretrained(MODEL_ID,
@@ -50,14 +50,14 @@ pipe = WanImageToVideoPipeline.from_pretrained(MODEL_ID,
50
 
51
  pipe.load_lora_weights(
52
  "Kijai/WanVideo_comfy",
53
- weight_name="Lightx2v/lightx2v_I2V_14B_480p_cfg_step_distill_rank256_bf16.safetensors",
54
  adapter_name="lightx2v"
55
  )
56
  kwargs_lora = {}
57
  kwargs_lora["load_into_transformer_2"] = True
58
  pipe.load_lora_weights(
59
  "Kijai/WanVideo_comfy",
60
- weight_name="Lightx2v/lightx2v_I2V_14B_480p_cfg_step_distill_rank256_bf16.safetensors",
61
  adapter_name="lightx2v_2", **kwargs_lora
62
  )
63
  pipe.set_adapters(["lightx2v", "lightx2v_2"], adapter_weights=[1., 1.])
@@ -142,7 +142,7 @@ def get_duration(
142
  randomize_seed,
143
  progress,
144
  ):
145
- BASE_FRAMES_HEIGHT_WIDTH = 120 * 640 * 480
146
  BASE_STEP_DURATION = 10
147
 
148
  width, height = resize_image(input_image).size
 
19
 
20
  MODEL_ID = "Wan-AI/Wan2.2-I2V-A14B-Diffusers"
21
 
22
+ MAX_DIM = 832
23
  MIN_DIM = 480
24
  SQUARE_DIM = 640
25
  MULTIPLE_OF = 16
26
 
27
  MAX_SEED = np.iinfo(np.int32).max
28
 
29
+ FIXED_FPS = 16
30
+ MIN_FRAMES_MODEL = 8
31
+ MAX_FRAMES_MODEL = 80
32
 
33
  MIN_DURATION = round(MIN_FRAMES_MODEL/FIXED_FPS,1)
34
+ MAX_DURATION = round(MAX_FRAMES_MODEL/FIXED_FPS,1)
35
 
36
 
37
  pipe = WanImageToVideoPipeline.from_pretrained(MODEL_ID,
 
50
 
51
  pipe.load_lora_weights(
52
  "Kijai/WanVideo_comfy",
53
+ weight_name="Lightx2v/lightx2v_I2V_14B_480p_cfg_step_distill_rank128_bf16.safetensors",
54
  adapter_name="lightx2v"
55
  )
56
  kwargs_lora = {}
57
  kwargs_lora["load_into_transformer_2"] = True
58
  pipe.load_lora_weights(
59
  "Kijai/WanVideo_comfy",
60
+ weight_name="Lightx2v/lightx2v_I2V_14B_480p_cfg_step_distill_rank128_bf16.safetensors",
61
  adapter_name="lightx2v_2", **kwargs_lora
62
  )
63
  pipe.set_adapters(["lightx2v", "lightx2v_2"], adapter_weights=[1., 1.])
 
142
  randomize_seed,
143
  progress,
144
  ):
145
+ BASE_FRAMES_HEIGHT_WIDTH = 81 * 832 * 624
146
  BASE_STEP_DURATION = 10
147
 
148
  width, height = resize_image(input_image).size