Skip to content

armgit / fuobe

Public Imported from GitHub
0

The open creative studio on ComfyUI: images, video, 3D and audio on open weights, on your own GPU or the cloud. Camera motions, effects, apps, Cinema, Layers, Image to 3D and an AI agent.

Restore 1: Lightricks' Restore and Detail Refine IC-LoRAs on record, an HF token for gated downloads

Claude43e00ff2f119
diff --git a/docs/research/fuobe-originals-recipes-5.json b/docs/research/fuobe-originals-recipes-5.json
index 9d238da1..681a1165 100644
--- a/docs/research/fuobe-originals-recipes-5.json
+++ b/docs/research/fuobe-originals-recipes-5.json
@@ -5015,7 +5015,7 @@
"id": "fal-ai/ltx-2.3-22b/reference-video-to-video/lora",
"family": "LTX-2.3 22B",
"op": "ref-v2v",
- "roleForOriginals": "IC-LoRA restyle (ic_lora_type)",
+ "roleForOriginals": "IC-LoRA restyle (ic_lora_type); Fuobe Restore's cloud half (package archive-restore): the archive clip as video_url, the Restore IC-LoRA by its mirror URL in loras, ic_lora_type and preprocessor none, one untiled pass at the 720p or 1080p tier's size",
"lora": {
"field": "loras",
"required": true,
@@ -5044,7 +5044,444 @@
"ic_lora_type": "string default=\"union\" enum=[\"match_preprocessor\", \"union\", \"detailer\", \"none\"]",
"num_frames": "integer default=121 minimum=9 maximum=481"
},
- "pathAccepts": "URL, HuggingFace repo ID (owner/repo) to lora weights."
+ "pathAccepts": "URL, HuggingFace repo ID (owner/repo) to lora weights.",
+ "inputs": {
+ "prompt": {
+ "type": "string",
+ "required": true,
+ "desc": "The prompt to generate the video from.",
+ "examples": [
+ "style: cinematic/realistic. A man wearing a baseball cap walks through a modern town. He holds a coffee cup."
+ ]
+ },
+ "video_url": {
+ "type": "string",
+ "required": true,
+ "desc": "The URL of the video to reference.",
+ "examples": [
+ "https://v3b.fal.media/files/b/0a963ecf/eVoII1AsconU8SpPx5xoE_output.mp4"
+ ]
+ },
+ "audio_url": {
+ "nullable": true,
+ "type": "string",
+ "required": false,
+ "desc": "An optional URL of an audio to use as the audio for the video. If not provided, any audio present in the input video will be used."
+ },
+ "image_url": {
+ "nullable": true,
+ "type": "string",
+ "required": false,
+ "desc": "An optional URL of an image to use as the first frame of the video."
+ },
+ "end_image_url": {
+ "nullable": true,
+ "type": "string",
+ "required": false,
+ "desc": "The URL of the image to use as the end of the video."
+ },
+ "match_video_length": {
+ "type": "boolean",
+ "required": false,
+ "default": true,
+ "desc": "When enabled, the number of frames will be calculated based on the video duration and FPS. When disabled, use the specified num_frames."
+ },
+ "num_frames": {
+ "type": "integer",
+ "required": false,
+ "default": 121,
+ "minimum": 9,
+ "maximum": 481,
+ "desc": "The number of frames to generate."
+ },
+ "video_size": {
+ "type": "union",
+ "variants": [
+ {
+ "type": "object",
+ "fields": {
+ "height": {
+ "type": "integer",
+ "required": false,
+ "default": 512,
+ "maximum": 14142,
+ "minimumExclusive": 0,
+ "desc": "The height of the generated image."
+ },
+ "width": {
+ "type": "integer",
+ "required": false,
+ "default": 512,
+ "maximum": 14142,
+ "minimumExclusive": 0,
+ "desc": "The width of the generated image."
+ }
+ },
+ "required": false
+ },
+ {
+ "type": "enum",
+ "values": [
+ "auto",
+ "square_hd",
+ "square",
+ "portrait_4_3",
+ "portrait_16_9",
+ "landscape_4_3",
+ "landscape_16_9"
+ ],
+ "valueType": "string",
+ "required": false
+ }
+ ],
+ "default": "auto",
+ "desc": "The size of the generated video."
+ },
+ "generate_audio": {
+ "type": "boolean",
+ "required": false,
+ "default": true,
+ "desc": "Whether to generate audio for the video."
+ },
+ "use_multiscale": {
+ "type": "boolean",
+ "required": false,
+ "default": true,
+ "desc": "Whether to use multi-scale generation. If True, the model will generate the video at a smaller scale first, then use the smaller video to guide the generation of a video at or above your requested size. This results in better coherence and details."
+ },
+ "match_input_fps": {
+ "type": "boolean",
+ "required": false,
+ "default": true,
+ "desc": "When true, match the output FPS to the input video's FPS instead of using the default target FPS."
+ },
+ "fps": {
+ "type": "number",
+ "required": false,
+ "default": 24,
+ "minimum": 1,
+ "maximum": 60,
+ "desc": "The frames per second of the generated video."
+ },
+ "num_inference_steps": {
+ "type": "integer",
+ "required": false,
+ "default": 40,
+ "minimum": 8,
+ "maximum": 50,
+ "desc": "The number of inference steps to use."
+ },
+ "video_cfg_scale": {
+ "type": "number",
+ "required": false,
+ "default": 3,
+ "minimum": 1,
+ "maximum": 20,
+ "desc": "The Classifier-Free Guidance (CFG) scale for the video. Higher values result in more consistent and focused video content."
+ },
+ "video_stg_scale": {
+ "type": "number",
+ "required": false,
+ "default": 0,
+ "minimum": 0,
+ "maximum": 20,
+ "desc": "The Spatiotemporal Guidance (STG) scale for the video. Higher values result in more consistent and focused video content."
+ },
+ "video_rescaling_scale": {
+ "type": "number",
+ "required": false,
+ "default": 0.7,
+ "minimum": 0,
+ "maximum": 1,
+ "desc": "The rescaling scale for the video. Controls the ratio between classifier-free guidance and spatiotemporal guidance."
+ },
+ "video_modality_scale": {
+ "type": "number",
+ "required": false,
+ "default": 3,
+ "minimum": 0,
+ "maximum": 10,
+ "desc": "The modality scale for the video. Controls the ratio between video and audio modalities."
+ },
+ "audio_cfg_scale": {
+ "type": "number",
+ "required": false,
+ "default": 7,
+ "minimum": 1,
+ "maximum": 20,
+ "desc": "The Classifier-Free Guidance (CFG) scale for the audio. Higher values result in more consistent and focused audio content."
+ },
+ "audio_stg_scale": {
+ "type": "number",
+ "required": false,
+ "default": 0,
+ "minimum": 0,
+ "maximum": 20,
+ "desc": "The Spatiotemporal Guidance (STG) scale for the audio. Higher values result in more consistent and focused audio content."
+ },
+ "audio_rescaling_scale": {
+ "type": "number",
+ "required": false,
+ "default": 0.7,
+ "minimum": 0,
+ "maximum": 1,
+ "desc": "The rescaling scale for the audio. Controls the ratio between classifier-free guidance and spatiotemporal guidance."
+ },
+ "audio_modality_scale": {
+ "type": "number",
+ "required": false,
+ "default": 3,
+ "minimum": 0,
+ "maximum": 10,
+ "desc": "The modality scale for the audio. Controls the ratio between video and audio modalities."
+ },
+ "gradient_estimation_gamma": {
+ "type": "number",
+ "required": false,
+ "default": 2,
+ "minimum": 0,
+ "maximum": 10,
+ "desc": "The gamma of gradient estimation during denoising. Set to 0 to disable."
+ },
+ "use_restart_sampling": {
+ "type": "boolean",
+ "required": false,
+ "default": false,
+ "desc": "Whether to use restart sampling. This will inject a small amount of noise during each denoising step, which can help improve the quality of the generated video."
+ },
+ "scheduler": {
+ "type": "enum",
+ "values": [
+ "ltx2",
+ "linear_quadratic",
+ "beta"
+ ],
+ "valueType": "string",
+ "required": false,
+ "default": "ltx2",
+ "desc": "The scheduler to use.",
+ "examples": [
+ "ltx2"
+ ]
+ },
+ "acceleration": {
+ "type": "enum",
+ "values": [
+ "none",
+ "regular",
+ "high",
+ "full"
+ ],
+ "valueType": "string",
+ "required": false,
+ "default": "regular",
+ "desc": "The acceleration level to use.",
+ "examples": [
+ "regular"
+ ]
+ },
+ "camera_lora": {
+ "type": "enum",
+ "values": [
+ "dolly_in",
+ "dolly_out",
+ "dolly_left",
+ "dolly_right",
+ "jib_up",
+ "jib_down",
+ "static",
+ "none"
+ ],
+ "valueType": "string",
+ "required": false,
+ "default": "none",
+ "desc": "The camera LoRA to use. This allows you to control the camera movement of the generated video more accurately than just prompting the model to move the camera.",
+ "examples": [
+ "none"
+ ]
+ },
+ "camera_lora_scale": {
+ "type": "number",
+ "required": false,
+ "default": 1,
+ "minimum": 0,
+ "maximum": 1,
+ "desc": "The scale of the camera LoRA to use. This allows you to control the camera movement of the generated video more accurately than just prompting the model to move the camera."
+ },
+ "negative_prompt": {
+ "type": "string",
+ "required": false,
+ "default": "news broadcast, 3d animation, computer graphics, pc game, console game, video game, cartoon, childish, watermark, logo, text, on screen text, subtitles, titles, signature, slowmo, static",
+ "desc": "The negative prompt to generate the video from."
+ },
+ "seed": {
+ "nullable": true,
+ "type": "integer",
+ "required": false,
+ "desc": "The seed for the random number generator."
+ },
+ "enable_prompt_expansion": {
+ "type": "boolean",
+ "required": false,
+ "default": true,
+ "desc": "Whether to enable prompt expansion."
+ },
+ "enable_safety_checker": {
+ "type": "boolean",
+ "required": false,
+ "default": true,
+ "desc": "Whether to enable the safety checker."
+ },
+ "video_output_type": {
+ "type": "enum",
+ "values": [
+ "X264 (.mp4)",
+ "VP9 (.webm)",
+ "PRORES4444 (.mov)",
+ "GIF (.gif)"
+ ],
+ "valueType": "string",
+ "required": false,
+ "default": "X264 (.mp4)",
+ "desc": "The output type of the generated video."
+ },
+ "video_quality": {
+ "type": "enum",
+ "values": [
+ "low",
+ "medium",
+ "high",
+ "maximum"
+ ],
+ "valueType": "string",
+ "required": false,
+ "default": "high",
+ "desc": "The quality of the generated video."
+ },
+ "video_write_mode": {
+ "type": "enum",
+ "values": [
+ "fast",
+ "balanced",
+ "small"
+ ],
+ "valueType": "string",
+ "required": false,
+ "default": "balanced",
+ "desc": "The write mode of the generated video."
+ },
+ "sync_mode": {
+ "type": "boolean",
+ "required": false,
+ "default": false,
+ "desc": "If `True`, the media will be returned as a data URI and the output data won't be available in the request history."
+ },
+ "loras": {
+ "type": "array",
+ "items": "object",
+ "itemSchema": {
+ "weight_name": {
+ "nullable": true,
+ "type": "string",
+ "required": false,
+ "desc": "Name of the LoRA weight. Only used if `path` is a HuggingFace repository, and is only required when the repository contains multiple LoRA weights."
+ },
+ "path": {
+ "type": "string",
+ "required": false,
+ "desc": "URL, HuggingFace repo ID (owner/repo) to lora weights."
+ },
+ "scale": {
+ "type": "number",
+ "required": false,
+ "default": 1,
+ "minimum": 0,
+ "maximum": 4,
+ "desc": "Scale factor for LoRA application (0.0 to 4.0)."
+ }
+ },
+ "itemRequired": [
+ "path"
+ ],
+ "required": true,
+ "desc": "The LoRAs to use for the generation."
+ },
+ "distill_lora_first_pass_scale": {
+ "type": "number",
+ "required": false,
+ "default": 0.2,
+ "minimum": 0,
+ "maximum": 1,
+ "desc": "The scale of the distill LoRA to use for the first pass. Set to 0 to disable."
+ },
+ "distill_lora_second_pass_scale": {
+ "type": "number",
+ "required": false,
+ "default": 0.5,
+ "minimum": 0,
+ "maximum": 1,
+ "desc": "The scale of the distill LoRA to use for the second and subsequent passes."
+ },
+ "video_strength": {
+ "type": "number",
+ "required": false,
+ "default": 1,
+ "minimum": 0,
+ "maximum": 1,
+ "desc": "Video conditioning strength. Lower values represent more freedom given to the model to change the video content."
+ },
+ "audio_strength": {
+ "type": "number",
+ "required": false,
+ "default": 1,
+ "minimum": 0,
+ "maximum": 1,
+ "desc": "Audio conditioning strength. Lower values represent more freedom given to the model to change the audio content."
+ },
+ "preprocessor": {
+ "type": "enum",
+ "values": [
+ "depth",
+ "canny",
+ "pose",
+ "none"
+ ],
+ "valueType": "string",
+ "required": false,
+ "default": "none",
+ "desc": "The preprocessor to use for the generation."
+ },
+ "ic_lora_type": {
+ "type": "enum",
+ "values": [
+ "match_preprocessor",
+ "union",
+ "detailer",
+ "none"
+ ],
+ "valueType": "string",
+ "required": false,
+ "default": "union",
+ "desc": "The IC LoRA type to use for the generation.",
+ "examples": [
+ "union"
+ ]
+ }
+ },
+ "keyFields": {
+ "prompt": "prompt",
+ "negativePrompt": "negative_prompt",
+ "aspectRatio": "video_size",
+ "seed": "seed",
+ "generateAudio": "generate_audio",
+ "numFrames": "num_frames",
+ "fps": "fps",
+ "loras": "loras",
+ "video": "video_url",
+ "image": "image_url"
+ },
+ "output": "video.url",
+ "inputsChecked": "2026-10-30"
},
{
"provider": "fal",
@@ -18749,6 +19186,94 @@
"words": "rotate: '将镜头向左旋转{n}度 Rotate the camera {n} degrees to the left.' (right for a negative angle); forward 1–5: '将镜头向前移动 Move the camera forward.', above 5: '将镜头转为特写镜头 Turn the camera to a close-up.'; vertical −1: '将相机转向鸟瞰视角 Turn the camera to a bird's-eye view.', 1: '将相机切换到仰视视角 Turn the camera to a worm's-eye view.'; wide-angle: '将镜头转为广角镜头 Turn the camera to a wide-angle lens.' (the LoRA card's instructions, as the public HF Space builds them)"
}
}
+ },
+ {
+ "id": "archive-restore",
+ "name": "Restore & colourise (archive footage)",
+ "higgsfield": "none: an owner request (2026-10-29), not a Higgsfield product",
+ "original": {
+ "model": "fuobe-restore",
+ "recipe": "Lightricks' LTX Restore IC-LoRA card (Hugging Face Lightricks/LTX-2.5-22b-IC-LoRA-Restore at 79245e197a6cd3251e77d178dc380b0e9f2d6563)",
+ "open": {
+ "workflow": "video-restore-ltx25-tiled",
+ "base": "LTX-2.5 22B distilled (Fuobe's int8 convrot transformer, LTX-2.5 video VAE, Gemma 4 12B text encoder) + the Restore IC-LoRA at 1.0 (LTXICLoRALoaderModelOnly)",
+ "canvas": "lanczos to 1440 wide for 4:3-ish sources (1440x1088), 1920 wide for 16:9 (1920x1088); multiples of 32; the shape kept (never stretched); portrait mirrored",
+ "tiles": {
+ "width": 960,
+ "height": 544,
+ "overlap": 0.5,
+ "blend": 0.05,
+ "gridCycle": 1
+ },
+ "sigmas": [
+ 1.0,
+ 0.99375,
+ 0.9875,
+ 0.98125,
+ 0.975,
+ 0.909375,
+ 0.725,
+ 0.421875,
+ 0.0
+ ],
+ "sampler": "euler",
+ "cfg": 1.0,
+ "windows": {
+ "frames": 97,
+ "prefix": 17,
+ "guide": "LTXVAddGuide at frame 0 (the previous window's last 17 restored frames)"
+ },
+ "reference": "optional: a grey canvas the size of the output with native crops (faces, signs, true colours) placed over their subjects, a second LTXAddVideoICLoRAGuide at frame_idx -1 (per tile)",
+ "deinterlace": "optional, before restoring; ComfyUI has no fieldmatch/yadif/decimate node, so Fuobe's graph keeps one field (nearest-row halving, no blending) and lets the lanczos resize rebuild the height",
+ "stage2": {
+ "workflow": "video-refine-ltx25-tiled",
+ "lora": "ltx-2.5-22b-ic-lora-refine-details-1.0.safetensors",
+ "scale": 2,
+ "tiles": {
+ "width": 1024,
+ "height": 576,
+ "overlap": 0.5
+ }
+ },
+ "nodePack": {
+ "name": "ComfyUI-LTXVideo",
+ "repo": "https://github.com/Lightricks/ComfyUI-LTXVideo",
+ "commit": "220e1d45aa0469f518e982102fca4dca92a61862",
+ "licence": "LTX-2 Community License (the repository's LICENSE file; free below US$10M annual revenue)",
+ "nodes": [
+ "LTXICLoRALoaderModelOnly",
+ "LTXAddVideoICLoRAGuide",
+ "LTXVTiledFusionSampler"
+ ]
+ },
+ "gpu": "LTX-2.5 22B distilled, tiled: GPU-heavy (24 GB class; peak VRAM follows the tile and the 97-frame window, not the canvas); unmeasured here (CPU server)"
+ },
+ "cloud": {
+ "endpoint": "fal-ai/ltx-2.3-22b/reference-video-to-video/lora",
+ "fixed": {
+ "ic_lora_type": "none",
+ "preprocessor": "none",
+ "enable_prompt_expansion": false,
+ "generate_audio": false,
+ "match_video_length": true,
+ "match_input_fps": true
+ },
+ "untiled": "one pass at the tier's size for the clip's nearest shape (Fuobe Cinema's table: 1080p is 1440x1088 for 4:3 and 1920x1088 for 16:9, the card's canvas; 720p is 1024x768 / 1280x704), with no tile fusion (the card recommends tiles at every size)",
+ "pieces": "97 frames at most a call (8n+1), each piece after the first given the previous piece's last restored frame as image_url",
+ "price": "$0.001805 per megapixel of video (width × height × frames), rounded up per call",
+ "stage2": "none: the Detail Refine IC-LoRA is an LTX-2.5 LoRA and no host serves LTX-2.5 with LoRAs (open engine only)",
+ "lora": "the Restore IC-LoRA's mirror on fal storage (Fuobe downloads the gated file once with the user's HF token)",
+ "unverified": "whether fal's IC-LoRA path treats a custom IC-LoRA exactly as the card's reference guide (no live call made); ic_lora_type none keeps fal's own union/detailer IC-LoRA out",
+ "steps": "the endpoint's own (40, acceleration regular): fal runs LTX-2.3 22B dev with its distill LoRA, not the 2.5 distilled transformer the card's 8 steps are for"
+ },
+ "licence": {
+ "weights": "LTX-2.x Community License (free under US$10M annual revenue)",
+ "lora": "LTX-2.x Community License (free under US$10M annual revenue)",
+ "pack": "ComfyUI-LTXVideo under the LTX-2 Community License (its LICENSE file)"
+ },
+ "prompting": "period, place, light, materials, what people wear, ending in \"natural colour\"; negative = what it must not invent (modern objects, logos, signage, lettering, vehicles) plus the card's artefacts (blocky compression, banding, mosquito noise, ringing, blurry, smeared, ghosting, low resolution)",
+ "checked": "2026-10-30"
+ }
}
],
"counts": {
@@ -23882,6 +24407,51 @@
"fuobe-speak"
],
"notes": "The LoRA Higgsfield's 'Infinite Talk' engine loads ('fusex', scale 1, rank 32; higgsfield-originals-5.md §3.13) and InfiniteTalk's README recommends. Fuobe Speak loads it on InfiniteTalk (kijai's WanVideoWrapper) on the GPU in place of the lightx2v distill LoRA. fal's InfiniteTalk takes no LoRA, so the cloud half runs without it. Check on the first live run: the licences of the LoRAs merged into it."
+ },
+ {
+ "key": "ltx-2-5-22b-ic-lora-restore-1-0",
+ "name": "Lightricks LTX Restore IC-LoRA (archive restoration and colourisation)",
+ "url": "https://huggingface.co/Lightricks/LTX-2.5-22b-IC-LoRA-Restore/resolve/main/ltx-2.5-22b-ic-lora-restore-1.0.safetensors",
+ "page": "https://huggingface.co/Lightricks/LTX-2.5-22b-IC-LoRA-Restore",
+ "file": "ltx-2.5-22b-ic-lora-restore-1.0.safetensors",
+ "strength": 1.0,
+ "base": "ltx-2.3-22b",
+ "licence": "LTX-2.x Community License (free under US$10M annual revenue)",
+ "commercial": true,
+ "hostedOk": true,
+ "download": "hf-gated",
+ "released": "2026-09-27",
+ "revision": "79245e197a6cd3251e77d178dc380b0e9f2d6563",
+ "sha256": "357728bc704b3f56e59c5f09cf0540ef3b3fb88a93bbd0b050dbfacd5e05c8b0",
+ "sizeBytes": 1711643914,
+ "checked": "2026-10-30",
+ "usedBy": [
+ "fuobe-restore"
+ ],
+ "hostedEndpoint": "fal-ai/ltx-2.3-22b/reference-video-to-video/lora",
+ "notes": "Rank-128 IC-LoRA (step 4000) trained on LTX-2.3 22B dev, tested unchanged on the LTX-2.5 distilled transformer (every number on its card). The archive clip, lanczos-resized to the working canvas (1440 wide for 4:3, 1920x1088 for 16:9, multiples of 32), is the frame-aligned reference at downscale factor 1; tiled latent fusion with 960x544 tiles at 50% overlap at every size; strength 1.0 is a switch (0.7 stays monochrome, 1.4 over-tints); 8 distilled steps (sigmas 1.0 … 0.0, euler), guidance 1.0; 8n+1 frames a pass (49 or 97), longer clips in 97-frame windows that start from the previous window's last 17 restored frames (LTXVAddGuide at frame 0); an optional reference image (native crops on a grey canvas) at frame_idx -1. Read 2026-10-30 from the model card (revision pinned) and the Hugging Face API (size and LFS SHA256). Gated on Hugging Face (\"Agree and Access\" on the model page, which also consents to Lightricks' offers): the file downloads only with the token of an account that accepted, so Fuobe asks for an HF token (Settings → LoRAs) and uses it only for gated downloads; a cloud run gets Fuobe's mirror of the file on fal storage, never the token."
+ },
+ {
+ "key": "ltx-2-5-22b-ic-lora-refine-details-1-0",
+ "name": "Lightricks LTX-2.5 Detail Refine IC-LoRA (restore to 4K, second pass)",
+ "url": "https://huggingface.co/Lightricks/LTX-2.5-22b-IC-LoRA-Refine-Details/resolve/main/ltx-2.5-22b-ic-lora-refine-details-1.0.safetensors",
+ "page": "https://huggingface.co/Lightricks/LTX-2.5-22b-IC-LoRA-Refine-Details",
+ "file": "ltx-2.5-22b-ic-lora-refine-details-1.0.safetensors",
+ "strength": 1.0,
+ "base": "ltx-2.5-22b",
+ "licence": "LTX-2.x Community License (free under US$10M annual revenue)",
+ "commercial": true,
+ "hostedOk": true,
+ "download": "hf-gated",
+ "released": "2026-09-27",
+ "revision": "4912c478b35dd96b6cdcc5f7c7ff9d72c2c57929",
+ "sha256": "771a84f70e143af89867fc714ebbf7bd6edcaa4974c0360cba4a2d292a99f0e6",
+ "sizeBytes": 1308787534,
+ "checked": "2026-10-30",
+ "usedBy": [
+ "fuobe-restore (Restore to 4K)"
+ ],
+ "notes": "The Restore card's stage 2: the restored clip lanczos x2 (2880x2176 from 1440x1088) through the same tiled-fusion workflow with this LoRA at 1.0, tile 1024x576; restore first, refine second (refining first sharpens the damage and desaturates the colour). Trained on LTX-2.5; no host serves LTX-2.5 with LoRAs, so it runs on your GPU only. Gated on Hugging Face (\"Agree and Access\" on the model page, which also consents to Lightricks' offers): the file downloads only with the token of an account that accepted, so Fuobe asks for an HF token (Settings → LoRAs) and uses it only for gated downloads; a cloud run gets Fuobe's mirror of the file on fal storage, never the token."
}
]
}
diff --git a/scripts/comfy/install-comfyui.sh b/scripts/comfy/install-comfyui.sh
index fbe9f858..e3bdbfbe 100755
--- a/scripts/comfy/install-comfyui.sh
+++ b/scripts/comfy/install-comfyui.sh
@@ -36,6 +36,10 @@ declare -A NODES=(
# reason; the code was read at this commit (no network, exec or download paths in the nodes). It needs einops and
# safetensors only, both already installed below. Weights: the DBS_WEIGHTS block at the end of this script.
[ComfyUI-DBS]="https://github.com/hiroki-abe-58/ComfyUI-DBS f656e53434b5485c148a2866fbd6ddc6b6152ed6"
+ # Lightricks' LTX nodes for Restore & colourise (package archive-restore): LTXICLoRALoaderModelOnly, LTXAddVideoICLoRAGuide
+ # and LTXVTiledFusionSampler (per-step tiled latent fusion). LTX-2 Community License (the repository's LICENSE: free below
+ # US$10M annual revenue). Read at this commit (2026-10-20); its requirements are installed below.
+ [ComfyUI-LTXVideo]="https://github.com/Lightricks/ComfyUI-LTXVideo 220e1d45aa0469f518e982102fca4dca92a61862"
)
# Licences are information (Settings → Models & licences has the switches): every pack is installed, the
# non-commercial ComfyUI-Whisper (CC-BY-NC-SA-4.0, used by the captions-whisper-burnin workflow) included.
@@ -129,6 +133,9 @@ fi
uv pip install --python "$PY" loguru
# ComfyUI-ToSVG imports vtracer (MIT), potracer and PyMuPDF (AGPL-3.0, used only by its SVG-to-image node) at load time.
uv pip install --python "$PY" "vtracer==0.6.15" "potracer==0.0.4" "PyMuPDF==1.26.5"
+# ComfyUI-LTXVideo (Restore & colourise): its requirements.txt at the pinned commit. colour-science, diffusers, einops,
+# huggingface_hub, kornia and transformers are already in the union above; OpenImageIO is for its HDR EXR nodes.
+uv pip install --python "$PY" "ninja~=1.11.1.4" openimageio || echo "warn: ComfyUI-LTXVideo's extra requirements failed to install"
if [ "${NC_PACKS:-1}" = "1" ]; then uv pip install --python "$PY" "openai-whisper==20250625"; fi
# Optional isolated worker (never in this install or its venv): LatentSync 1.6 lipsync and ThinkSound SFX change
diff --git a/scripts/fetch-hosted-schemas.py b/scripts/fetch-hosted-schemas.py
index eb332414..cf168592 100644
--- a/scripts/fetch-hosted-schemas.py
+++ b/scripts/fetch-hosted-schemas.py
@@ -48,6 +48,10 @@ LORA = {
"fal-ai/ltx-2.3-22b/text-to-video/lora": LTX,
"fal-ai/ltx-2.3-22b/video-to-video/lora": {**LTX, "video": "video_url"},
"fal-ai/ltx-2.3-22b/extend-video/lora": {**LTX, "video": "video_url", "endImage": "end_image_url"},
+ # Fuobe Restore's cloud half (package archive-restore): LTX-2.3 22B reference video to video with an IC-LoRA (Lightricks'
+ # Restore IC-LoRA, gated on Hugging Face, sent through Fuobe's LoRA mirror). The archive clip is the reference video;
+ # image_url, the optional first frame, takes the previous piece's last restored frame.
+ "fal-ai/ltx-2.3-22b/reference-video-to-video/lora": {**LTX, "video": "video_url", "image": "image_url"},
"fal-ai/wan/v2.2-a14b/image-to-video/lora": {"prompt": "prompt", "image": "image_url", "endImage": "end_image_url", "negativePrompt": "negative_prompt",
"aspectRatio": "aspect_ratio", "resolution": "resolution", "numFrames": "num_frames", "seed": "seed", "loras": "loras"},
"fal-ai/wan/v2.2-a14b/text-to-video/lora": {"prompt": "prompt", "negativePrompt": "negative_prompt", "aspectRatio": "aspect_ratio", "resolution": "resolution",
diff --git a/scripts/gen-cloud-models.py b/scripts/gen-cloud-models.py
index 887fd9f3..f65d136a 100644
--- a/scripts/gen-cloud-models.py
+++ b/scripts/gen-cloud-models.py
@@ -693,6 +693,23 @@ model("fuobe-evolution", "Fuobe Evolution", "Fuobe Original", "fuobe-evolution",
{"byResolution": EVOLUTION_PER_SECOND, "withLoras": EVOLUTION_PER_SECOND_LORA["720p"], "withLorasByResolution": EVOLUTION_PER_SECOND_LORA,
"videoMegapixel": {"usd": EVOLUTION_MP, "withLoras": EVOLUTION_MP_LORA}}),
defaults={"aspectRatio": "16:9", "duration": 5, "resolution": "720p"}, frame_step=8)
+# ----- Original (package archive-restore): Fuobe Restore's cloud half, Lightricks' Restore IC-LoRA on fal's LTX-2.3 22B
+# reference video to video (research studios[archive-restore].original.cloud). The archive clip is the reference video, the
+# LoRA (gated on Hugging Face) goes by Fuobe's mirror URL; fal's own IC-LoRAs and preprocessors stay out. One untiled pass a
+# call at the tier's size for the clip's nearest shape (Fuobe Cinema's table: the card's 1440x1088 / 1920x1088 at 1080p), as
+# many frames as the piece (src/lib/catalog/restore.ts cuts 97-frame pieces), at the clip's own frame rate. Priced per
+# megapixel of video like Fuobe Cinema; the endpoint is the /lora one, so its price is the LoRA price.
+RESTORE_O = next(s for s in ORIGINALS["studios"] if s["id"] == "archive-restore")["original"]["cloud"]
+RESTORE_MP = per_megapixel(RESTORE_O["endpoint"])
+RESTORE_PER_SECOND = {t: round(s["4:3"][0] * s["4:3"][1] * 24 / 1e6 * RESTORE_MP, 4) for t, s in CINEMA_SIZES.items() if t != "480p"}
+model("fuobe-restore", "Fuobe Restore", "Fuobe Original", "fuobe-restore", "video",
+ "Restore and colourise archive footage: Lightricks' Restore IC-LoRA on LTX-2.3, one untiled pass a piece",
+ [("restore-video", RESTORE_O["endpoint"], "fal", {"fixed": RESTORE_O["fixed"]})],
+ original=True, sizes={t: s for t, s in CINEMA_SIZES.items() if t != "480p"},
+ pricing=("second", RESTORE_PER_SECOND["720p"],
+ f"${RESTORE_MP} per megapixel of video (width × height × frames): about ${round(RESTORE_PER_SECOND['720p'] * 4, 2)} for 4 s of a 4:3 clip at 720p",
+ {"byResolution": RESTORE_PER_SECOND, "videoMegapixel": {"usd": RESTORE_MP}}),
+ defaults={"aspectRatio": "4:3", "resolution": "720p"}, frame_step=8)
# ----- Originals (O11): the rebranded open tools and Speak on hosted open weights (research studios[angles].original,
# studios[speak].original). Fuobe Angles is fal's LoRA-gallery route of Qwen-Image-Edit 2509 with dx8152's Multiple-angles
# LoRA: Higgsfield Angles' controls are its fields (rotate −90…90°, positive = left; vertical −1…1, −1 = bird's-eye;
@@ -1785,7 +1802,7 @@ def build_route(op, ep, provider, m, opts, ropts=None):
# becomes frames (FieldMap.numFrames, 4n+1 / 8n+1 by model), and the durations offered are the ones that fit.
nf = kf.get("numFrames") or (kf.get("duration") if kf.get("duration") in ("num_frames", "frames") else None)
# A talking avatar's frame count (fal's InfiniteTalk, Wan 2.2 S2V) follows the voice's length (params.sourceDuration).
- if nf and op in ("t2v", "i2v", "flf2v", "extend", "v2v", "avatar") and (inputs.get(nf) or {}).get("type") == "integer":
+ if nf and op in ("t2v", "i2v", "flf2v", "extend", "v2v", "avatar", "restore-video") and (inputs.get(nf) or {}).get("type") == "integer":
kf.pop("duration", None)
kf.pop("numFrames", None)
spec = inputs.get(nf) or {}
diff --git a/src/app/api/loras/route.ts b/src/app/api/loras/route.ts
index f09ba400..56b151f8 100644
--- a/src/app/api/loras/route.ts
+++ b/src/app/api/loras/route.ts
@@ -22,6 +22,7 @@ export const GET = handler({ access: "signed-in" }, async () => {
folder: folder || null,
...(problem && { folderProblem: problem }),
civitaiKey: !!getSetting("civitaiKey"),
+ hfToken: !!getSetting("hfToken"),
loras: LORA_LIBRARY.map((e) => ({
key: e.key,
name: e.name,
diff --git a/src/app/api/providers/test/route.ts b/src/app/api/providers/test/route.ts
index affc3d2d..0e09b9ac 100644
--- a/src/app/api/providers/test/route.ts
+++ b/src/app/api/providers/test/route.ts
@@ -1,5 +1,5 @@
import { candidateValues, isTestProvider, PROVIDER_SETTINGS, settingProblem } from "@/lib/connections";
-import { testCivitaiKey } from "@/server/loras";
+import { testCivitaiKey, testHfToken } from "@/server/loras";
import { testAiToolkit } from "@/server/training";
import { PROVIDERS } from "@/server/providers";
import { validateSetting, withCandidates, type SettingName } from "@/server/settings";
@@ -16,9 +16,17 @@ import { handler } from "@/server/access/route";
export const POST = handler({ access: "perm:install.settings" }, async (request: Request) => {
const body = (await request.json().catch(() => ({}))) as { provider?: unknown; value?: unknown; values?: unknown; field?: unknown };
const provider = body.provider;
- // The civitai key isn't a model provider's (it downloads LoRAs), nor is AI-Toolkit (it trains them).
+ // The civitai key and the Hugging Face token aren't a model provider's (they download LoRAs), nor is AI-Toolkit (it trains them).
const adapter =
- provider === "civitai" ? { test: testCivitaiKey } : provider === "ai-toolkit" ? { test: testAiToolkit } : isTestProvider(provider) ? PROVIDERS[provider as Exclude<typeof provider, "civitai" | "ai-toolkit">] : undefined;
+ provider === "civitai"
+ ? { test: testCivitaiKey }
+ : provider === "huggingface"
+ ? { test: testHfToken }
+ : provider === "ai-toolkit"
+ ? { test: testAiToolkit }
+ : isTestProvider(provider)
+ ? PROVIDERS[provider as Exclude<typeof provider, "civitai" | "huggingface" | "ai-toolkit">]
+ : undefined;
if (!isTestProvider(provider) || !adapter?.test) return Response.json({ ok: false, detail: "Unknown provider" }, { status: 400 });
const values = candidateValues(provider, body.values, body.value) as Partial<Record<SettingName, string>>;
try {
diff --git a/src/components/lora-settings.tsx b/src/components/lora-settings.tsx
index b8b46859..783638c5 100644
--- a/src/components/lora-settings.tsx
+++ b/src/components/lora-settings.tsx
@@ -10,7 +10,7 @@ import { Label } from "@/components/ui/label";
import { ConnectField, type PublicSetting } from "@/components/connect-field";
import { radioKeys, radioTab } from "@/components/studio/radio-keys";
import { saveSettings } from "@/lib/api";
-import { CIVITAI_KEYS_URL } from "@/lib/connections";
+import { CIVITAI_KEYS_URL, HF_TOKENS_URL } from "@/lib/connections";
import { cn } from "@/lib/utils";
interface LibraryLora {
@@ -37,6 +37,8 @@ interface Library {
/** Why the folder setting can't be read (a file, no permission). */
folderProblem?: string;
civitaiKey: boolean;
+ /** A Hugging Face token is set: gated files download with it. */
+ hfToken?: boolean;
loras: LibraryLora[];
}
@@ -67,7 +69,7 @@ function baseName(base: string): string {
const SOURCE: Record<LibraryLora["download"], string> = {
direct: "Hugging Face",
"civitai-token": "civitai · needs your key",
- "hf-gated": "Hugging Face · accept its licence first",
+ "hf-gated": "Hugging Face · gated: accept its licence, then your token downloads it",
};
/** The LoRA folder: a plain path field (no connection to test), saved with its own button. */
@@ -123,7 +125,7 @@ function FolderField({ setting }: { setting?: PublicSetting }) {
);
}
-function LoraRow({ l, folder, onDownload, busy }: { l: LibraryLora; folder: boolean; onDownload: () => void; busy: boolean }) {
+function LoraRow({ l, folder, onDownload, busy, hfToken }: { l: LibraryLora; folder: boolean; onDownload: () => void; busy: boolean; hfToken: boolean }) {
return (
<li className="flex items-center gap-3 py-2.5">
<div className="min-w-0 flex-1">
@@ -152,10 +154,14 @@ function LoraRow({ l, folder, onDownload, busy }: { l: LibraryLora; folder: bool
<span className="inline-flex shrink-0 items-center gap-1 text-[12px] text-success">
<CheckCircle2 className="size-3.5" /> In folder
</span>
- ) : l.download === "hf-gated" ? (
- <span className="inline-flex shrink-0 items-center gap-1 text-[12px] text-muted-foreground" title="Accept the licence on Hugging Face, then put the file in the folder">
- <Lock className="size-3.5" /> By hand
- </span>
+ ) : l.download === "hf-gated" && !hfToken ? (
+ <a
+ href="#huggingface"
+ className="inline-flex shrink-0 items-center gap-1 text-[12px] text-muted-foreground hover:text-foreground"
+ title="Accept the licence on its Hugging Face page, then add your Hugging Face token below"
+ >
+ <Lock className="size-3.5" /> Needs token
+ </a>
) : (
<Button
size="sm"
@@ -175,7 +181,7 @@ function LoraRow({ l, folder, onDownload, busy }: { l: LibraryLora; folder: bool
}
/** Settings → LoRAs: where LoRA files live, the civitai key, and the library with each file's licence. */
-export function LoraSettings({ folder, civitaiKey }: { folder?: PublicSetting; civitaiKey?: PublicSetting }) {
+export function LoraSettings({ folder, civitaiKey, hfToken }: { folder?: PublicSetting; civitaiKey?: PublicSetting; hfToken?: PublicSetting }) {
const qc = useQueryClient();
const [open, setOpen] = useState(false);
const [group, setGroup] = useState<LibraryLora["group"]>("look");
@@ -234,6 +240,23 @@ export function LoraSettings({ folder, civitaiKey }: { folder?: PublicSetting; c
</span>
}
/>
+ <ConnectField
+ id="huggingface"
+ name="hfToken"
+ setting={hfToken}
+ provider="huggingface"
+ label="Hugging Face token"
+ placeholder="hf_…"
+ hint={
+ <span>
+ Only for gated LoRAs (Lightricks&apos; Restore and Detail Refine IC-LoRAs): accept each one&apos;s licence on its Hugging Face page with your account, then a
+ “Read” token lets Fuobe download it. It stays on this server: a cloud run gets Fuobe&apos;s copy of the file, never your token.{" "}
+ <a href={HF_TOKENS_URL} target="_blank" rel="noreferrer" className="inline-flex items-center gap-1 text-brand-text hover:underline">
+ Make a token <ExternalLink className="size-3" />
+ </a>
+ </span>
+ }
+ />
<div className="rounded-xl border">
<button
type="button"
@@ -284,7 +307,7 @@ export function LoraSettings({ folder, civitaiKey }: { folder?: PublicSetting; c
)}
<ul className="max-h-96 divide-y overflow-y-auto">
{shown.map((l) => (
- <LoraRow key={l.key} l={l} folder={canDownload} busy={pending === l.file} onDownload={() => download.mutate(l)} />
+ <LoraRow key={l.key} l={l} folder={canDownload} busy={pending === l.file} hfToken={!!data?.hfToken} onDownload={() => download.mutate(l)} />
))}
</ul>
</div>
diff --git a/src/components/settings-form.tsx b/src/components/settings-form.tsx
index 94a4c907..232da801 100644
--- a/src/components/settings-form.tsx
+++ b/src/components/settings-form.tsx
@@ -339,7 +339,7 @@ export function SettingsForm({ prices }: { prices?: string }) {
title="LoRAs · looks, motions, effects and adapters"
description="Looks, camera moves and effects add LoRA files to open models, on your GPU and in the cloud; an adapter is the LoRA an Original always loads (Fuobe Try-On's). Fuobe fetches the pinned version a run needs and shows each file's licence; what may run where is your call in Models & licences."
>
- <LoraSettings folder={get("comfyLorasDir")} civitaiKey={get("civitaiKey")} />
+ <LoraSettings folder={get("comfyLorasDir")} civitaiKey={get("civitaiKey")} hfToken={get("hfToken")} />
</Section>
<Section
diff --git a/src/lib/catalog/cloud-models.generated.ts b/src/lib/catalog/cloud-models.generated.ts
index bcb4bdfb..197f4bba 100644
--- a/src/lib/catalog/cloud-models.generated.ts
+++ b/src/lib/catalog/cloud-models.generated.ts
@@ -19688,6 +19688,165 @@ export const ORIGINAL_CLOUD: ModelDef[] = [
}
}
},
+ {
+ "id": "fuobe-restore",
+ "name": "Fuobe Restore",
+ "vendor": "Fuobe Original",
+ "family": "fuobe-restore",
+ "engine": "cloud",
+ "kind": "video",
+ "tagline": "Restore and colourise archive footage: Lightricks' Restore IC-LoRA on LTX-2.3, one untiled pass a piece",
+ "routes": [
+ {
+ "op": "restore-video",
+ "provider": "fal",
+ "endpoint": "fal-ai/ltx-2.3-22b/reference-video-to-video/lora",
+ "map": {
+ "negativePrompt": "negative_prompt",
+ "image": "image_url",
+ "video": "video_url",
+ "seed": "seed",
+ "generateAudio": "generate_audio",
+ "fps": "fps",
+ "numFrames": {
+ "key": "num_frames",
+ "fps": 24,
+ "min": 9,
+ "max": 481,
+ "step": 8
+ },
+ "size": {
+ "key": "video_size",
+ "multiple": 16,
+ "table": {
+ "720p": {
+ "21:9": [
+ 1504,
+ 640
+ ],
+ "16:9": [
+ 1280,
+ 704
+ ],
+ "4:3": [
+ 1024,
+ 768
+ ],
+ "1:1": [
+ 960,
+ 960
+ ],
+ "3:4": [
+ 768,
+ 1024
+ ],
+ "9:16": [
+ 704,
+ 1280
+ ]
+ },
+ "1080p": {
+ "21:9": [
+ 2240,
+ 960
+ ],
+ "16:9": [
+ 1920,
+ 1088
+ ],
+ "4:3": [
+ 1440,
+ 1088
+ ],
+ "1:1": [
+ 1088,
+ 1088
+ ],
+ "3:4": [
+ 1088,
+ 1440
+ ],
+ "9:16": [
+ 1088,
+ 1920
+ ]
+ }
+ }
+ },
+ "fixed": {
+ "ic_lora_type": "none",
+ "preprocessor": "none",
+ "enable_prompt_expansion": false,
+ "generate_audio": false,
+ "match_video_length": true,
+ "match_input_fps": true
+ },
+ "loras": {
+ "shape": "items",
+ "key": "loras",
+ "required": true,
+ "range": {
+ "min": 0,
+ "max": 4
+ },
+ "weightName": true
+ }
+ }
+ }
+ ],
+ "options": {
+ "durations": [
+ 3,
+ 4,
+ 5,
+ 6,
+ 8,
+ 10,
+ 12,
+ 15,
+ 20
+ ],
+ "aspectRatios": [
+ "21:9",
+ "16:9",
+ "4:3",
+ "1:1",
+ "3:4",
+ "9:16"
+ ],
+ "resolutions": [
+ "720p",
+ "1080p"
+ ],
+ "negativePrompt": true,
+ "seed": true,
+ "audio": true,
+ "maxImages": 1
+ },
+ "licence": {
+ "licence": "LTX-2 / LTX-2.x Community License",
+ "commercial": true,
+ "note": "Free for companies under US$10M annual revenue; above that a paid licence (github.com/Lightricks/LTX-2 LICENSE-2, LICENSE-2_x, section 2.1)",
+ "checked": "2026-10-23"
+ },
+ "defaults": {
+ "aspectRatio": "4:3",
+ "resolution": "720p",
+ "generateAudio": true
+ },
+ "pricing": {
+ "unit": "second",
+ "usd": 0.0341,
+ "note": "$0.001805 per megapixel of video (width \u00d7 height \u00d7 frames): about $0.14 for 4 s of a 4:3 clip at 720p",
+ "byResolution": {
+ "720p": 0.0341,
+ "1080p": 0.0679
+ },
+ "videoMegapixel": {
+ "usd": 0.001805
+ }
+ }
+ },
{
"id": "fuobe-angles",
"name": "Fuobe Angles",
diff --git a/src/lib/catalog/lora-library.generated.ts b/src/lib/catalog/lora-library.generated.ts
index 0b6ad4bc..7b14247e 100644
--- a/src/lib/catalog/lora-library.generated.ts
+++ b/src/lib/catalog/lora-library.generated.ts
@@ -3194,6 +3194,51 @@ export const LORA_LIBRARY: LoraEntry[] = [
},
"released": "2025-06-10",
"notes": "The LoRA Higgsfield's 'Infinite Talk' engine loads ('fusex', scale 1, rank 32; higgsfield-originals-5.md §3.13) and InfiniteTalk's README recommends. Fuobe Speak loads it on InfiniteTalk (kijai's WanVideoWrapper) on the GPU in place of the lightx2v distill LoRA. fal's InfiniteTalk takes no LoRA, so the cloud half runs without it. Check on the first live run: the licences of the LoRAs merged into it."
+ },
+ {
+ "key": "ltx-2-5-22b-ic-lora-restore-1-0",
+ "name": "Lightricks LTX Restore IC-LoRA (archive restoration and colourisation)",
+ "file": "ltx-2.5-22b-ic-lora-restore-1.0.safetensors",
+ "url": "https://huggingface.co/Lightricks/LTX-2.5-22b-IC-LoRA-Restore/resolve/79245e197a6cd3251e77d178dc380b0e9f2d6563/ltx-2.5-22b-ic-lora-restore-1.0.safetensors",
+ "page": "https://huggingface.co/Lightricks/LTX-2.5-22b-IC-LoRA-Restore",
+ "strength": 1.0,
+ "base": "ltx-2.3-22b",
+ "download": "hf-gated",
+ "group": "adapter",
+ "version": "79245e197a6cd3251e77d178dc380b0e9f2d6563",
+ "sha256": "357728bc704b3f56e59c5f09cf0540ef3b3fb88a93bbd0b050dbfacd5e05c8b0",
+ "sizeBytes": 1711643914,
+ "licence": {
+ "commercial": true,
+ "hostedOk": true,
+ "snapshotDate": "2026-10-30",
+ "name": "LTX-2.x Community License (free under US$10M annual revenue)"
+ },
+ "released": "2026-09-27",
+ "hostedEndpoint": "fal-ai/ltx-2.3-22b/reference-video-to-video/lora",
+ "notes": "Rank-128 IC-LoRA (step 4000) trained on LTX-2.3 22B dev, tested unchanged on the LTX-2.5 distilled transformer (every number on its card). The archive clip, lanczos-resized to the working canvas (1440 wide for 4:3, 1920x1088 for 16:9, multiples of 32), is the frame-aligned reference at downscale factor 1; tiled latent fusion with 960x544 tiles at 50% overlap at every size; strength 1.0 is a switch (0.7 stays monochrome, 1.4 over-tints); 8 distilled steps (sigmas 1.0 … 0.0, euler), guidance 1.0; 8n+1 frames a pass (49 or 97), longer clips in 97-frame windows that start from the previous window's last 17 restored frames (LTXVAddGuide at frame 0); an optional reference image (native crops on a grey canvas) at frame_idx -1. Read 2026-10-30 from the model card (revision pinned) and the Hugging Face API (size and LFS SHA256). Gated on Hugging Face (\"Agree and Access\" on the model page, which also consents to Lightricks' offers): the file downloads only with the token of an account that accepted, so Fuobe asks for an HF token (Settings → LoRAs) and uses it only for gated downloads; a cloud run gets Fuobe's mirror of the file on fal storage, never the token."
+ },
+ {
+ "key": "ltx-2-5-22b-ic-lora-refine-details-1-0",
+ "name": "Lightricks LTX-2.5 Detail Refine IC-LoRA (restore to 4K, second pass)",
+ "file": "ltx-2.5-22b-ic-lora-refine-details-1.0.safetensors",
+ "url": "https://huggingface.co/Lightricks/LTX-2.5-22b-IC-LoRA-Refine-Details/resolve/4912c478b35dd96b6cdcc5f7c7ff9d72c2c57929/ltx-2.5-22b-ic-lora-refine-details-1.0.safetensors",
+ "page": "https://huggingface.co/Lightricks/LTX-2.5-22b-IC-LoRA-Refine-Details",
+ "strength": 1.0,
+ "base": "ltx-2.5-22b",
+ "download": "hf-gated",
+ "group": "adapter",
+ "version": "4912c478b35dd96b6cdcc5f7c7ff9d72c2c57929",
+ "sha256": "771a84f70e143af89867fc714ebbf7bd6edcaa4974c0360cba4a2d292a99f0e6",
+ "sizeBytes": 1308787534,
+ "licence": {
+ "commercial": true,
+ "hostedOk": true,
+ "snapshotDate": "2026-10-30",
+ "name": "LTX-2.x Community License (free under US$10M annual revenue)"
+ },
+ "released": "2026-09-27",
+ "notes": "The Restore card's stage 2: the restored clip lanczos x2 (2880x2176 from 1440x1088) through the same tiled-fusion workflow with this LoRA at 1.0, tile 1024x576; restore first, refine second (refining first sharpens the damage and desaturates the colour). Trained on LTX-2.5; no host serves LTX-2.5 with LoRAs, so it runs on your GPU only. Gated on Hugging Face (\"Agree and Access\" on the model page, which also consents to Lightricks' offers): the file downloads only with the token of an account that accepted, so Fuobe asks for an HF token (Settings → LoRAs) and uses it only for gated downloads; a cloud run gets Fuobe's mirror of the file on fal storage, never the token."
}
];
diff --git a/src/lib/catalog/loras.ts b/src/lib/catalog/loras.ts
index 32dda1d5..e30e205a 100644
--- a/src/lib/catalog/loras.ts
+++ b/src/lib/catalog/loras.ts
@@ -172,10 +172,11 @@ function fitSlots(field: LoraField, loras: LoraRef[]): { kept: LoraRef[]; over:
/**
* A cloud API can be sent this LoRA: not local-only, and with a URL it can fetch (a mirror or a public file),
- * a civitai file Fuobe mirrors before the run, or the user's own trained LoRA (Fuobe sends its copy). Not a gated
- * Hugging Face file (no HF token here) nor a file that exists only on the user's ComfyUI.
+ * a civitai file or a gated Hugging Face file Fuobe mirrors before the run (with the user's civitai key or Hugging Face
+ * token, which never leave the server: src/server/loras.ts), or the user's own trained LoRA (Fuobe sends its copy).
+ * Not a file that exists only on the user's ComfyUI.
*/
-const sendable = (l: LoraRef) => !localOnly(l) && (!!cloudPath(l) || (!!l.url && needsToken(l.url)) || (!!l.own && (!!l.url || !!l.file)));
+const sendable = (l: LoraRef) => !localOnly(l) && (!!cloudPath(l) || (!!l.url && (needsToken(l.url) || gated(l))) || (!!l.own && (!!l.url || !!l.file)));
const sendableToCloud = (loras: LoraRef[]) => loras.filter(sendable);
/** fal's `/lora` endpoints before FieldMap.loras was generated: loras [{path, scale}]. */
@@ -204,7 +205,8 @@ const list = (names: string[]) => (names.length < 2 ? names.join("") : `${names.
* The LoRAs a cloud run carries, and what it says about the ones it leaves out:
* - a LoRA licensed for the user's GPU only (civitai "RentCivit" only) is sent and said, unless Settings → Models &
* licences keeps such LoRAs on the GPU (localOnly): then this run leaves it out;
- * - a gated Hugging Face LoRA (accept its licence first) runs only on the user's GPU;
+ * - a gated Hugging Face LoRA is copied to the provider once with the user's Hugging Face token (the server says
+ * what to do when there is none);
* - a LoRA that exists only as a file on the user's ComfyUI (an open-engine training) can't be sent;
* - beyond the API's maximum (3 on Z-Image, Qwen, FLUX.2 [klein] and LTX-2.3 quality; one per expert on
* Replicate's Wan 2.2), the first ones win. planGeneration puts the user's own LoRAs (an @character's
@@ -216,9 +218,7 @@ export function fitLoras(loras: LoraRef[], route: Pick<ModelRoute, "provider" |
const notes: string[] = [];
const local = [...new Set(loras.filter(localOnly).map(loraName))];
if (local.length) notes.push(`${list(local)} ${local.length > 1 ? "are" : "is"} licensed for your GPU only and Settings → Models & licences keeps such LoRAs off the cloud, so this run leaves ${local.length > 1 ? "them" : "it"} out`);
- const locked = loras.filter((l) => !localOnly(l) && !l.hostedUrl && gated(l));
- if (locked.length) notes.push(`${list(locked.map(loraName))} ${locked.length > 1 ? "are" : "is"} in a gated Hugging Face repo, so this cloud run leaves ${locked.length > 1 ? "them" : "it"} out (on your GPU ${locked.length > 1 ? "they run" : "it runs"} once you've accepted the licence)`);
- const unsent = loras.filter((l) => !localOnly(l) && !gated(l) && !sendable(l));
+ const unsent = loras.filter((l) => !localOnly(l) && !sendable(l));
if (unsent.length) notes.push(`${list(unsent.map(loraName))} ${unsent.length > 1 ? "exist" : "exists"} only on your ComfyUI, so this cloud run leaves ${unsent.length > 1 ? "them" : "it"} out`);
const cloud = sendableToCloud(loras);
const field = routeLoraField(route);
diff --git a/src/lib/catalog/plan.ts b/src/lib/catalog/plan.ts
index cc2e6361..954e7cf3 100644
--- a/src/lib/catalog/plan.ts
+++ b/src/lib/catalog/plan.ts
@@ -13,7 +13,7 @@ import type {
} from "./types";
import { sourceSeconds } from "./clip-windows";
import { chainGapProblem, chainTiming, FIRST_AT_ZERO, frameTimes, keyframeChain, MAX_KEYFRAMES, spread } from "./keyframes";
-import { cloudPath, fitLoras, gated, localOnly, loraCapacity, needsToken, routeLoraField, triggerOf } from "./loras";
+import { cloudPath, fitLoras, localOnly, loraCapacity, needsToken, routeLoraField, triggerOf } from "./loras";
import { anglesPrompt, anglesWords, ANGLES_ORIGINAL } from "./open-tools";
import { askedSize, numFramesValue, sizeValue } from "./payload";
import { characterScale, CINEMA_CROP, soulKind, soulMegapixels, soulRecipe, soulSize, type SoulOverlay } from "./soul";
@@ -154,6 +154,8 @@ const PROMPTLESS = new Set<Operation>([
"sdr-to-hdr", "export-video", "ocr", "still-motion", "audio-loop", "audio-join", "scene-3d", "splat", "rig-3d", "extract-frames", "images-to-video", "overlay",
// round 5 (O11): the face mosaic names the faces itself ("face")
"face-mosaic",
+ // archive-restore: the scene's words help (period, place, light) but a run without them gets a neutral one
+ "restore-video",
]);
/**
@@ -537,6 +539,7 @@ const NEEDS: Partial<
keyframes: { images: 1, msg: "Add the keyframes, in order" },
"sdr-to-hdr": { video: true, msg: "Add the video to convert" },
"face-mosaic": { images: 1, msg: "Add the picture whose faces to pixelate" },
+ "restore-video": { video: true, msg: "Add the archive clip to restore" },
"export-video": { video: true, msg: "Add the video to export" },
ocr: { images: 1, msg: "Add the image to read" },
"still-motion": { images: 1, msg: "Add the still to move over" },
@@ -679,7 +682,6 @@ export function routeLoras(route: Pick<ModelRoute, "provider" | "map" | "loraEnd
const field = routeLoraField(route);
const why = (l: LoraRef) => {
if (localOnly(l)) return "it is licensed for your GPU only, and Settings → Models & licences keeps such LoRAs off the cloud";
- if (gated(l) && !l.hostedUrl) return "it is in a gated Hugging Face repo, so it runs only on your GPU";
if (!cloudPath(l) && !needsToken(l.url) && !l.own) return "no URL to send to the LoRA endpoint";
if (!field) return "this route takes no LoRAs";
return field.shape === "experts" ? "this API takes one LoRA per expert" : `this API takes up to ${loraCapacity(field)} LoRAs`;
diff --git a/src/lib/catalog/types.ts b/src/lib/catalog/types.ts
index d1f39740..b615666a 100644
--- a/src/lib/catalog/types.ts
+++ b/src/lib/catalog/types.ts
@@ -84,7 +84,9 @@ export type Operation =
// round 5 (O11)
| "face-mosaic" // image → the same picture with the faces (or what the prompt names) pixelated: SAM 3.1 mask + mosaic
// N7-5
- | "camera-path"; // image + params.cameraPath (+ inputs.video: the open engine's render along the path) → the camera following the path
+ | "camera-path" // image + params.cameraPath (+ inputs.video: the open engine's render along the path) → the camera following the path
+ // archive-restore
+ | "restore-video"; // archive video (+ prompt: period, place, light; negative: what not to invent) → the same shot clean, in colour, larger
export const OPERATION_LABELS: Record<Operation, string> = {
t2i: "Text to image",
@@ -153,6 +155,7 @@ export const OPERATION_LABELS: Record<Operation, string> = {
overlay: "Overlay image",
"face-mosaic": "Pixelate faces",
"camera-path": "Fly path",
+ "restore-video": "Restore & colourise",
};
export const OPERATION_OUTPUT: Record<Operation, MediaKind> = {
@@ -223,6 +226,7 @@ export const OPERATION_OUTPUT: Record<Operation, MediaKind> = {
overlay: "image",
"face-mosaic": "image",
"camera-path": "video",
+ "restore-video": "video",
};
/**
diff --git a/src/lib/connections.ts b/src/lib/connections.ts
index ba1dfadf..466b8937 100644
--- a/src/lib/connections.ts
+++ b/src/lib/connections.ts
@@ -4,7 +4,7 @@
* address looks like, when to offer the first-run guide, and each connection's one-line status.
*/
-export type TestProvider = "fal" | "replicate" | "comfyui" | "llm" | "civitai" | "ai-toolkit";
+export type TestProvider = "fal" | "replicate" | "comfyui" | "llm" | "civitai" | "huggingface" | "ai-toolkit";
/** The settings each provider's connection test reads; an unsaved value for one of them can be tested before it's saved. */
export const PROVIDER_SETTINGS = {
@@ -14,6 +14,8 @@ export const PROVIDER_SETTINGS = {
llm: ["anthropicKey", "ollamaUrl", "ollamaModel", "enhanceProvider"],
// Not a model provider: the key that downloads a recipe's civitai LoRAs (Settings → LoRAs).
civitai: ["civitaiKey"],
+ // Nor this: the token that downloads gated Hugging Face LoRAs once their licence is accepted (Settings → LoRAs).
+ huggingface: ["hfToken"],
// Not a model provider either: the trainer Soul IDs and Fuobe looks train on, on your GPU (Settings → Training).
"ai-toolkit": ["aiToolkitUrl", "aiToolkitToken", "aiToolkitDatasetDir"],
} as const satisfies Record<TestProvider, readonly string[]>;
@@ -38,6 +40,8 @@ export function candidateValues(provider: TestProvider, values?: unknown, value?
/** Where to get a civitai API key (Settings → LoRAs links to it). */
export const CIVITAI_KEYS_URL = "https://civitai.com/user/account";
+/** Where to make a Hugging Face access token (a "Read" token is enough for gated downloads). */
+export const HF_TOKENS_URL = "https://huggingface.co/settings/tokens";
/** Where to get a fal.ai key (the guide and Settings link to it). */
export const FAL_KEYS_URL = "https://fal.ai/dashboard/keys";
/** The ComfyUI address a local install listens on. */
diff --git a/src/lib/licences.ts b/src/lib/licences.ts
index 57d08428..65d2b31d 100644
--- a/src/lib/licences.ts
+++ b/src/lib/licences.ts
@@ -431,6 +431,12 @@ export const NODE_PACKS: NodePack[] = [
...GPL,
note: "H3 Relay 2.0 (Sendy Software LLC and contributors); GPL-3.0 code, vendored Context Loop and Spectrum GPL-3.0. Opt-in (H3_RELAY=1): it registers HTTP routes when it loads",
}),
+ // Restore & colourise (package archive-restore): Lightricks' LTX nodes (IC-LoRA loader and guide, tiled fusion sampler).
+ pack("ComfyUI-LTXVideo", "https://github.com/Lightricks/ComfyUI-LTXVideo/tree/220e1d45aa0469f518e982102fca4dca92a61862", {
+ name: "LTX-2 Community License",
+ class: "conditions",
+ note: "Lightricks' LTX nodes (IC-LoRA loader and guide, per-step tiled latent fusion); the repository's LICENSE is the LTX-2 Community License: free, commercial use included, below US$10M annual revenue",
+ }),
// DBS soundtrack separation (docs/research/dbs-separation-7.md §3.2), pinned in install-comfyui.sh.
pack("ComfyUI-DBS", "https://github.com/hiroki-abe-58/ComfyUI-DBS/tree/f656e53434b5485c148a2866fbd6ddc6b6152ed6", {
name: "MIT",
diff --git a/src/server/loras.ts b/src/server/loras.ts
index ea1c4043..5d95953e 100644
--- a/src/server/loras.ts
+++ b/src/server/loras.ts
@@ -107,13 +107,24 @@ function recordCopy(c: Omit<LoraCopy, "createdAt">): void {
/** The civitai key, as set in Settings or CIVITAI_API_KEY. */
const civitaiKey = () => getSetting("civitaiKey");
-/** A URL as it may be shown or stored: never with a token in it. */
+/** The Hugging Face token (Settings or HF_TOKEN): used only to download gated Hugging Face files. */
+const hfToken = () => getSetting("hfToken");
+
+/** Whether a Hugging Face token is set (gated downloads need one). */
+export const hasHfToken = (): boolean => !!hfToken();
+
+/** A URL as it may be shown or stored: never with a token in it (the civitai key or the Hugging Face token). */
export function redact(text: string, token = civitaiKey()): string {
let out = text.replace(/([?&]token=)[^&\s"']+/gi, "$1•••");
- if (token) out = out.split(token).join("•••");
+ for (const t of [token, hfToken()]) if (t) out = out.split(t).join("•••");
return out;
}
+/** What to do when a gated file has no token to download it with. */
+export function gatedHint(name: string, page?: string): string {
+ return `${name} is in a gated Hugging Face repo: accept its licence${page ? ` on ${page}` : ""} with your Hugging Face account, then add an access token in Settings → LoRAs (huggingface.co/settings/tokens) so Fuobe can download it`;
+}
+
const withToken = (url: string, token: string) => `${url}${url.includes("?") ? "&" : "?"}token=${encodeURIComponent(token)}`;
/** What civitai says about a pinned version: the file's size and SHA256, and the model it belongs to. */
@@ -144,8 +155,8 @@ export async function civitaiPermissions(modelId: string): Promise<string[] | nu
}
/** What Hugging Face says about a file before the download: its SHA256 (x-linked-etag), size and the commit it's at. */
-async function hfFacts(url: string): Promise<{ sha256?: string; sizeBytes?: number; revision?: string }> {
- const res = await fetch(url, { method: "HEAD", redirect: "manual", signal: AbortSignal.timeout(30_000) }).catch(() => null);
+async function hfFacts(url: string, token?: string): Promise<{ sha256?: string; sizeBytes?: number; revision?: string }> {
+ const res = await fetch(url, { method: "HEAD", redirect: "manual", headers: token ? { Authorization: `Bearer ${token}` } : {}, signal: AbortSignal.timeout(30_000) }).catch(() => null);
if (!res) return {};
const etag = res.headers.get("x-linked-etag")?.replace(/"/g, "");
const size = Number(res.headers.get("x-linked-size"));
@@ -184,9 +195,10 @@ export async function downloadLora(ref: LoraRef, dir: string, onProgress?: (mess
const name = loraName(ref);
const url = entry?.url ?? ref.url;
if (!url) throw new LoraError(`${name} has no download address — put ${ref.file} in ComfyUI/models/loras`);
- if (entry?.download === "hf-gated") {
- throw new LoraError(`${name} is in a gated Hugging Face repo: accept its licence on ${entry.page}, then put ${ref.file} in ComfyUI/models/loras`);
- }
+ // A gated Hugging Face file downloads with the user's token (only there: never to fal, Replicate or civitai).
+ const gatedFile = entry?.download === "hf-gated";
+ const token = gatedFile ? hfToken() : "";
+ if (gatedFile && !token) throw new LoraError(`${gatedHint(name, entry?.page)}, or put ${ref.file} in ComfyUI/models/loras yourself`);
const dest = lorasPath(dir, ref.file);
let expect: { sha256?: string; sizeBytes?: number } = {};
let version: string | null = null;
@@ -204,7 +216,7 @@ export async function downloadLora(ref: LoraRef, dir: string, onProgress?: (mess
if (!expect.sha256) throw unchecked();
fetchUrl = withToken(url, token);
} else {
- const facts = await hfFacts(url);
+ const facts = entry?.sha256 ? {} : await hfFacts(url, token || undefined);
expect = entry?.sha256 ? { sha256: entry.sha256, sizeBytes: entry.sizeBytes } : facts;
version = entry?.version ?? facts.revision ?? null;
// A Hugging Face file always states its SHA256; other hosts (a trained LoRA on fal storage) state none.
@@ -213,13 +225,18 @@ export async function downloadLora(ref: LoraRef, dir: string, onProgress?: (mess
onProgress?.(`Downloading ${name}${expect.sizeBytes ? ` (${mb(expect.sizeBytes)})` : ""}`);
let res: Response;
try {
- res = await fetch(fetchUrl, { redirect: "follow", signal: AbortSignal.timeout(60 * 60_000) });
+ // The token goes to huggingface.co only: fetch drops Authorization when the file redirects to Hugging Face's CDN.
+ res = await fetch(fetchUrl, { redirect: "follow", headers: token ? { Authorization: `Bearer ${token}` } : {}, signal: AbortSignal.timeout(60 * 60_000) });
} catch (e) {
throw new LoraError(`Couldn't reach ${new URL(url).host} to download ${name} (${redact((e as Error).message)})`);
}
if (res.status === 401 || res.status === 403) {
throw new LoraError(
- needsToken(url) ? `civitai refused the download of ${name} (${res.status}): check your civitai key in Settings → LoRAs` : `${new URL(url).host} refused the download of ${name} (${res.status})`,
+ needsToken(url)
+ ? `civitai refused the download of ${name} (${res.status}): check your civitai key in Settings → LoRAs`
+ : gatedFile
+ ? `Hugging Face refused the download of ${name} (${res.status}): accept its licence on ${entry?.page ?? "its model page"} with the account your token belongs to, and check the token in Settings → LoRAs`
+ : `${new URL(url).host} refused the download of ${name} (${res.status})`,
);
}
if (!res.ok || !res.body) throw new LoraError(`Downloading ${name} failed: ${new URL(url).host} answered ${res.status}`);
@@ -371,15 +388,18 @@ export async function prepareCloudLoras(
out.push(l);
continue;
}
- if (gated(l)) throw new LoraError(`${name} is in a gated Hugging Face repo, so it can't be sent to ${host}: it runs on your GPU once you've accepted its licence`);
- if (!l.url || !needsToken(l.url)) throw new LoraError(`${name} can't be sent to ${host}: it exists only as a file on your ComfyUI`);
+ const locked = gated(l);
+ if (!l.url || (!needsToken(l.url) && !locked)) throw new LoraError(`${name} can't be sent to ${host}: it exists only as a file on your ComfyUI`);
const cached = getCopy(l.file, target);
if (cached?.hostedUrl && Date.now() - cached.createdAt < MIRROR_TTL_MS[target]) {
out.push({ ...l, hostedUrl: cached.hostedUrl });
continue;
}
- const civitai = { ...l, url: l.url };
- out.push(await mirrorOnce(l, target, () => mirrorCivitai(civitai, entry, target, upload, onProgress)));
+ // A gated Hugging Face file: Fuobe downloads it once with the user's token and copies it to the provider's storage
+ // (the token never leaves this server), as it does for a civitai file.
+ if (locked && !hfToken()) throw new LoraError(`${gatedHint(name, entry?.page)}. A cloud run gets Fuobe's copy of the file, never your token`);
+ const source = { ...l, url: l.url };
+ out.push(await mirrorOnce(l, target, () => mirrorCivitai(source, entry, target, upload, onProgress)));
}
return out;
}
@@ -397,8 +417,10 @@ async function mirrorCivitai(
// The hosting right is read again before a copy is made (civitai permissions can change) and recorded with the copy.
// It decides only while the admin keeps GPU-only LoRAs on the GPU: then no answer, or no "Rent", means no copy.
const version = l.version ?? entry?.version ?? civitaiVersion(l.url);
- const strict = !!l.keepOnGpu;
- const modelId = entry?.civitaiModel ?? (version ? (await civitaiVersionFacts(version)).modelId : undefined);
+ // A gated Hugging Face file has no civitai permissions: its licence snapshot is the research's (hostedOk on record).
+ const civitai = needsToken(l.url);
+ const strict = !!l.keepOnGpu && civitai;
+ const modelId = civitai ? (entry?.civitaiModel ?? (version ? (await civitaiVersionFacts(version)).modelId : undefined)) : undefined;
const now = modelId ? await civitaiPermissions(modelId) : null;
if (strict && !now) throw new LoraError(`Couldn't confirm on civitai that ${name} may run on a hosted service, so it isn't copied to ${host} (Settings → Models & licences keeps LoRAs licensed for your GPU only off the cloud). Try again in a moment, or run it on your GPU`);
if (strict && !now!.includes("Rent")) {
@@ -433,7 +455,7 @@ async function mirrorCivitai(
hostedUrl,
sha256: facts?.sha256 ?? crypto.createHash("sha256").update(data).digest("hex"),
sizeBytes: data.length,
- licence: { ...licenceSnapshot(l, entry, now), ...(hostingNote(now) && { hosting: hostingNote(now) }) },
+ licence: { ...licenceSnapshot(l, entry, now), ...(civitai && hostingNote(now) && { hosting: hostingNote(now) }), ...(!civitai && { hosting: "a gated Hugging Face file, downloaded once with your token; its licence allows hosted use (the research's snapshot)" }) },
});
return { ...l, hostedUrl };
}
@@ -608,6 +630,24 @@ export function withoutMissingOnComfy(loras: LoraRef[], listed: string[] | null)
}
/** Test the civitai key (Settings → Save & test): civitai's /me answers 200 for a good key. */
+/** Settings → LoRAs' Save & test for the Hugging Face token: who it belongs to (whoami), and whether it can read. */
+export async function testHfToken(): Promise<{ ok: boolean; detail: string }> {
+ const token = hfToken();
+ if (!token) return { ok: false, detail: "No token set" };
+ let res: Response;
+ try {
+ res = await fetch("https://huggingface.co/api/whoami-v2", { headers: { Authorization: `Bearer ${token}` }, signal: AbortSignal.timeout(15_000) });
+ } catch (e) {
+ return { ok: false, detail: `Can't reach Hugging Face (${redact((e as Error).message)})` };
+ }
+ if (res.status === 401 || res.status === 403) return { ok: false, detail: `Token rejected (${res.status})` };
+ if (!res.ok) return { ok: false, detail: `Couldn't check the token: Hugging Face answered ${res.status}. Try again in a moment` };
+ const me = (await res.json().catch(() => ({}))) as { name?: string; auth?: { accessToken?: { role?: string } } };
+ const role = me.auth?.accessToken?.role;
+ const who = me.name ? `Signed in as ${me.name}` : "Token accepted";
+ return { ok: true, detail: `${who}${role ? ` (${role} token)` : ""}. Accept each gated LoRA's licence on its Hugging Face page with this account` };
+}
+
export async function testCivitaiKey(): Promise<{ ok: boolean; detail: string }> {
const token = civitaiKey();
if (!token) return { ok: false, detail: "No key set" };
diff --git a/src/server/settings.ts b/src/server/settings.ts
index c691914e..bee26985 100644
--- a/src/server/settings.ts
+++ b/src/server/settings.ts
@@ -37,6 +37,11 @@ export const SETTINGS = {
comfyLorasDir: { key: "comfyui.lorasDir", env: "COMFYUI_LORAS_DIR" },
/** civitai API key: downloads the civitai LoRAs of a recipe (civitai answers 401 without one). Never sent to fal or Replicate. */
civitaiKey: { key: "civitai.key", env: "CIVITAI_API_KEY", secret: true },
+ /**
+ * Hugging Face access token: downloads the LoRAs of gated Hugging Face repos (Lightricks' Restore and Detail Refine
+ * IC-LoRAs) once their licence is accepted with that account. Used for nothing else; never sent to fal or Replicate.
+ */
+ hfToken: { key: "huggingface.token", env: "HF_TOKEN", secret: true },
/** AI-Toolkit UI (ostris/ai-toolkit, port 8675) for open-source character LoRA training. */
aiToolkitUrl: { key: "aitk.url", env: "AI_TOOLKIT_URL" },
aiToolkitToken: { key: "aitk.token", env: "AI_TOOLKIT_AUTH", secret: true },
diff --git a/tests/fal-lora.test.ts b/tests/fal-lora.test.ts
index bb14ea2d..ad0ac3d2 100644
--- a/tests/fal-lora.test.ts
+++ b/tests/fal-lora.test.ts
@@ -111,7 +111,7 @@ describe("fal LoRA payloads (generated FieldMap.loras)", () => {
expect(cloudPath({ ...y2k, hostedUrl: "https://v3.fal.media/files/y2k.safetensors" })).toBe("https://v3.fal.media/files/y2k.safetensors");
const map = route("z-image-turbo-cloud", "t2i").map!;
expect(buildPayload(map, { prompt: "p", loras: [y2k] }).loras).toBeUndefined();
- // A gated Hugging Face file can't be fetched by fal either.
+ // A gated Hugging Face file can't be fetched by fal either: it goes as Fuobe's mirror (src/server/loras.ts).
expect(cloudPath(loraRef(loraEntry("ltx-2-3-22b-ic-lora-relight-1-0")!))).toBeUndefined();
});
diff --git a/tests/lora-fetch.test.ts b/tests/lora-fetch.test.ts
index c9daea1d..eec74810 100644
--- a/tests/lora-fetch.test.ts
+++ b/tests/lora-fetch.test.ts
@@ -298,16 +298,35 @@ describe("Before a cloud run", () => {
expect(net.calls.filter((c) => c.url.includes("/api/download/"))).toEqual([]);
});
- it("leaves a gated Hugging Face LoRA out of a cloud run with a note, never failing the run", async () => {
+ it("sends a gated Hugging Face LoRA through Fuobe's mirror: with the HF token it is copied once, without one the run says what to do", async () => {
const relight = loraRef(loraEntry("ltx-2-3-22b-ic-lora-relight-1-0")!);
const fpv = loraRef(loraEntry("ltx2-3-fpv-motion")!);
const ltx = { provider: "fal" as const, map: { loras: { shape: "items" as const, key: "loras", required: true } }, loraEndpoint: "fal-ai/ltx-2.3-22b/image-to-video/lora" };
+ // The fit keeps it (a copy is made before the run), and route choice counts it as something to carry.
const fitted = fitLoras([relight, fpv], ltx);
- expect(fitted.loras).toEqual([fpv]);
- expect(fitted.notes).toEqual([`${loraEntry("ltx-2-3-22b-ic-lora-relight-1-0")!.name} is in a gated Hugging Face repo, so this cloud run leaves it out (on your GPU it runs once you've accepted the licence)`]);
- // It counts as nothing to carry when routes are compared, and is refused by name if it gets this far.
- expect(lorasFit({ provider: "replicate", map: { loras: { shape: "single", weights: "w", scale: "s" } } }, [relight])).toBe(true);
- await expect(prepareCloudLoras([relight], "fal", upload().fn)).rejects.toThrow(/gated Hugging Face repo, so it can't be sent to fal\.ai/);
+ expect(fitted.loras).toEqual([relight, fpv]);
+ expect(fitted.notes).toEqual([]);
+ // No token: refused by name, with where to accept the licence and where the token goes; nothing is fetched.
+ setSetting("hfToken", "");
+ net = network({});
+ await expect(prepareCloudLoras([relight], "fal", upload().fn)).rejects.toThrow(/gated Hugging Face repo: accept its licence on https:\/\/huggingface\.co\/Lightricks\/LTX-2\.3-22b-IC-LoRA-Relight .*Settings → LoRAs/);
+ expect(net.calls).toEqual([]);
+ net.restore();
+ // With the token: downloaded once with it (Authorization to huggingface.co, never in a URL), copied to fal, recorded.
+ const HF = "hf_secret0123456789abcdef";
+ setSetting("hfToken", HF);
+ const body = Buffer.from("relight".repeat(64));
+ const pinned = { ...relight, file: relight.file };
+ net = network({ [loraEntry("ltx-2-3-22b-ic-lora-relight-1-0")!.url]: () => new Response(new Uint8Array(body), { status: 200, headers: { "content-length": String(body.length) } }) });
+ const up = upload();
+ // The library pins the real file's SHA256, which this stand-in doesn't match: the copy is refused, not sent.
+ await expect(prepareCloudLoras([pinned], "fal", up.fn)).rejects.toThrow(/doesn't match what huggingface\.co says it is/);
+ const get = net.calls.find((c) => c.method === "GET")!;
+ expect(get.headers.authorization).toBe(`Bearer ${HF}`);
+ expect(get.url).not.toContain(HF);
+ expect(up.sent).toEqual([]);
+ expect(redact(`failed with ${HF}`)).toBe("failed with •••");
+ setSetting("hfToken", "");
});
it("mirrors the pinned bytes, not a same-named file of other bytes in the LoRA folder", async () => {