Skip to content

The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.

fix: FramePack workflow validation — correct input types and values

PurpleDoubleD5d407841e560
diff --git a/src/api/dynamic-workflow.ts b/src/api/dynamic-workflow.ts
index 60eace6f..e6f7e7a7 100644
--- a/src/api/dynamic-workflow.ts
+++ b/src/api/dynamic-workflow.ts
@@ -580,10 +580,13 @@ function buildFramePackWorkflow(params: VideoParams, seed: number, nodes: Catego
const samplerId = String(n++)
const decodeId = String(n++)
- workflow[modelId] = { class_type: 'LoadFramePackModel', inputs: { model: params.model, base_precision: 'fp8_e4m3fn', quantization: 'disabled', load_device: 'main_device' } }
+ workflow[modelId] = { class_type: 'LoadFramePackModel', inputs: { model: params.model, base_precision: 'bf16', quantization: 'disabled', load_device: 'main_device' } }
workflow[clipId] = { class_type: 'CLIPLoader', inputs: { clip_name: 'llava_llama3_fp8_scaled.safetensors', type: 'wan', device: 'default' } }
workflow[vaeId] = { class_type: 'VAELoader', inputs: { vae_name: 'hunyuanvideo15_vae_fp16.safetensors' } }
workflow[imageId] = { class_type: 'LoadImage', inputs: { image: params.inputImage || 'input_image.png' } }
+ // Encode image to latent (FramePackSampler needs LATENT, not IMAGE)
+ const vaeEncodeId = String(n++)
+ workflow[vaeEncodeId] = { class_type: 'VAEEncode', inputs: { pixels: [imageId, 0], vae: [vaeId, 0] } }
workflow[posId] = { class_type: 'CLIPTextEncode', inputs: { text: params.prompt, clip: [clipId, 0] } }
const negId = String(n++)
workflow[negId] = { class_type: 'CLIPTextEncode', inputs: { text: '', clip: [clipId, 0] } }
@@ -591,10 +594,10 @@ function buildFramePackWorkflow(params: VideoParams, seed: number, nodes: Catego
class_type: 'FramePackSampler',
inputs: {
model: [modelId, 0], positive: [posId, 0], negative: [negId, 0],
- start_latent: [imageId, 0], steps: params.steps, cfg: params.cfgScale || 1.0,
- guidance_scale: 9.0, shift: 3.0, seed, latent_window_size: 9,
- total_second_length: (params.numFrames || 5) / (params.fps || 16),
- gpu_memory_preservation: 6.0, sampler: 'unipc',
+ start_latent: [vaeEncodeId, 0], steps: params.steps, cfg: params.cfgScale || 1.0,
+ guidance_scale: 10.0, shift: 3.0, seed, latent_window_size: 9,
+ total_second_length: (params.numFrames || 49) / (params.fps || 16),
+ gpu_memory_preservation: 6.0, sampler: 'unipc_bh2',
use_teacache: true, teacache_rel_l1_thresh: 0.15,
},
}