24 lines
1.3 KiB
Python
24 lines
1.3 KiB
Python
|
|
"""Run one direct FL2VA H3 denoiser call from raw prompt conditioning."""
|
||
|
|
|
||
|
|
import torch
|
||
|
|
|
||
|
|
from h3_blackwell_runtime.checkpoint import H3Checkpoint
|
||
|
|
from h3_blackwell_runtime.denoiser import H3PackedDenoiser
|
||
|
|
from h3_blackwell_runtime.packing import H3PromptPacker
|
||
|
|
from h3_blackwell_runtime.qwen3vl_text import Qwen3VLPromptConditioner
|
||
|
|
from h3_blackwell_runtime.t2v import empty_av_latents
|
||
|
|
|
||
|
|
|
||
|
|
prompt = "A brass-and-paper dragon flies above a rain-washed old city at blue hour."
|
||
|
|
text_encoder = Qwen3VLPromptConditioner("/text-encoders/qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors", "/opt/h3-blackwell-runtime/qwen25_tokenizer")
|
||
|
|
checkpoint = H3Checkpoint("/models/minimax_h3_fl2va_pruned_nvfp4.safetensors")
|
||
|
|
video, audio, _ = empty_av_latents(960, 544, 124)
|
||
|
|
video.normal_()
|
||
|
|
text = text_encoder(prompt)
|
||
|
|
hidden, timesteps, segments, positions, video_segment, audio_segment = H3PromptPacker(checkpoint)(text, video, audio, 1.0)
|
||
|
|
model = H3PackedDenoiser.from_checkpoint(checkpoint).eval()
|
||
|
|
with torch.inference_mode():
|
||
|
|
velocity_video, velocity_audio = model(hidden, timesteps, positions, segments, video_segment, audio_segment)
|
||
|
|
torch.cuda.synchronize()
|
||
|
|
print({"video": tuple(velocity_video.shape), "audio": tuple(velocity_audio.shape), "finite": torch.isfinite(velocity_video).all().item() and torch.isfinite(velocity_audio).all().item()})
|