Model reference · open weights
FOFPred is an open-weight image model from Salesforce. AxForge deploys and operates it for you on dedicated EU-owned hardware — with the licence handled where one is required.
Available as managed deployment — configured and operated for you on dedicated EU hardware, quoted per deployment.
What it is
| Maker | Salesforce |
|---|---|
| Type | Image models |
| Task | Image edit |
| Parameters (lead) | 4.0B |
| Runs with | diffusers |
| Released | 2025-12-09 |
| Popularity | 29 downloads / month |
| Licence | Open weights |
About
Paper | Project Site | Demo
FOFPred is a diffusion-based model that predicts future optical flow from a single image guided by natural language instructions. Given an input image and a text prompt describing a desired action (e.g., "Moving the water bottle from right to left"), FOFPred generates 4 sequential optical flow frames showing how objects would move.
import einops
import numpy as np
import torch
from diffusers import DiffusionPipeline
from PIL import Image
# Load pipeline with trust_remote_code
pipeline = DiffusionPipeline.from_pretrained(
"Salesforce/FOFPred",
torch_dtype=torch.bfloat16,
trust_remote_code=True,
).to("cuda")
# Run inference
results = pipeline(
prompt="Moving the water bottle from right to left.",
input_images=[Image.open("your_image.jpg")],
width=256,
height=256,
num_inference_steps=1,
num_images_per_prompt=4,
frame_count=4,
generator=torch.Generator(device="cuda").manual_seed(42),
output_type="pt",
)
flow_frames = results.images # [B, F, C, H, W]
output_tensor = flow_frames[0] # [F, C, H, W]
output_np = pipeline.image_processor.pt_to_numpy(output_tensor) # [F, H, W, C]
reshaped = einops.rearrange(output_np, "f h w c -> h (f w) c")
img = Image.fromarray((reshaped * 255).astype(np.uint8))
img.save("output_combined.png")
| Component | Model |
|---|---|
| V-LLM | Qwen2.5-VL-3B-Instruct |
| DiT | OmniGen2Transformer3DModel |
| VAE | FLUX.1-dev AutoencoderKL |
| Scheduler | FlowMatchEulerDiscreteScheduler |
Our code and weights are released under the CC by-NC 4.0 license.
From the published model card. Full card on the HuggingFace links in the sidebar.
Using it via the API
Once AxForge deploys fofpred for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (fofpred below is illustrative; you get the exact model name on deployment.)
$ curl -sS https://api.axforge.ai/v1/images/generations \
-H "Authorization: Bearer $AXFORGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"fofpred","prompt":"a red bicycle","size":"1024x1024"}'
Create an account — your API key is available in the console. 5M tokens/month currently included with every new account at launch.