File size: 2,111 Bytes
cdefade
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import os
import warnings
import numpy as np
from diffusers import (
    FlowMatchEulerDiscreteScheduler,
    SASolverScheduler,
    DEISMultistepScheduler,
    DPMSolverMultistepInverseScheduler,
    UniPCMultistepScheduler,
    DPMSolverMultistepScheduler,
    DPMSolverSinglestepScheduler,
)

os.environ["TOKENIZERS_PARALLELISM"] = "true"
warnings.filterwarnings("ignore")
IS_ZERO_GPU = bool(os.getenv("SPACES_ZERO_GPU"))

DT = os.environ.get("DATASET_TOKEN", "")
SULPHUR_API_URL = os.environ.get("SULPHUR_API_URL", "http://localhost:6666")
VIP_PASS = os.environ.get("VIP_PASSWORD", "").strip()

MODEL_ID = "thornmaze/WAMU_v3_WAN2.2_I2V_LIGHTNING"
LORA_MODELS = []
MAX_DIM = 640
MIN_DIM = 480
SQUARE_DIM = 576
MULTIPLE_OF = 16
MAX_SEED = np.iinfo(np.int32).max
FIXED_FPS = 16
MIN_FRAMES_MODEL = 8
MAX_FRAMES_MODEL = 129
MIN_DURATION = round(MIN_FRAMES_MODEL / FIXED_FPS, 1)
MAX_DURATION = 8.0

SCHEDULER_MAP = {
    "FlowMatchEulerDiscrete": FlowMatchEulerDiscreteScheduler,
    "SASolver": SASolverScheduler,
    "DEISMultistep": DEISMultistepScheduler,
    "DPMSolverMultistepInverse": DPMSolverMultistepInverseScheduler,
    "UniPCMultistep": UniPCMultistepScheduler,
    "DPMSolverMultistep": DPMSolverMultistepScheduler,
    "DPMSolverSinglestep": DPMSolverSinglestepScheduler,
}

default_prompt_i2v = ""
default_negative_prompt = (
    "static, motionless, frozen, blurry, low quality, worst quality, JPEG compression artifacts, "
    "overexposed, underexposed, washed-out gray look, noisy, grain, bad anatomy, bad proportions, "
    "deformed, disfigured, malformed limbs, fused fingers, extra fingers, missing fingers, poorly drawn hands, "
    "poorly drawn face, extra limbs, extra legs, extra arms, mutated hands, mutated body, three legs, "
    "motionless image, jitter, flickering, temporal distortion, unnatural motion, morphing artifacts, "
    "glitched movement, walking backwards, floating limbs, text, watermark, logo, subtitles, signature, "
    "cluttered background, bad lighting, stylized artwork, painting, 3d render"
)

def model_title():
    return "## Wan 2.2 I2V 14B Lightning"