Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
32c9de1
Release 0.6.2: update notes
KBRASK Nov 18, 2026
5c57934
A card below the hardware floor gets the unsupported-GPU card even wh…
KBRASK Nov 18, 2026
b5a59eb
ComfyUI startup card: no raw error text on the card
KBRASK Nov 18, 2026
bbe4a87
Startup error message: formal wording, and no request to attach a fil…
KBRASK Nov 18, 2026
9f9d1b2
Assistant task failures now say what happened and what to do next ins…
KBRASK Nov 18, 2026
90dbc54
Model upgrade failures state the cause and the next step; card shows …
KBRASK Nov 18, 2026
3df37d1
Editor and upload failures say why: invalid-request and export errors…
KBRASK Nov 18, 2026
0db1b39
Model download: continue when the mount table cannot be read
KBRASK Nov 18, 2026
45d4e95
Creation panel: a cleared duration, width or height stays empty, and …
KBRASK Nov 18, 2026
40292ac
H3 Image: plan against the card's free memory on every card, not only…
KBRASK Nov 18, 2026
f10d7fa
Your creations: after a batch delete the keyboard stays in the librar…
KBRASK Nov 18, 2026
c66a86e
Media panel: only its picture button shows the picture tip, other too…
KBRASK Nov 18, 2026
f0b8b08
Two-pass: the pinned video model stays resident for the latent upscal…
KBRASK Nov 18, 2026
3e4b0bb
Tooltips: a reason a control sets while it is hovered replaces the sh…
KBRASK Nov 18, 2026
805f61e
AI chat: the downloaded-report card on a failed picture spans the car…
KBRASK Nov 18, 2026
990cd1b
Report tip: in Chinese a clause too long for a narrow line breaks bet…
KBRASK Nov 18, 2026
f08fcaa
Models that made room for another program load again once the room is…
KBRASK Nov 18, 2026
5bc4071
Editor writes only what changes while the playhead moves
KBRASK Nov 18, 2026
b40c3b1
Touch screens show the actions that a mouse reveals on hover
KBRASK Nov 18, 2026
77d596b
Docs: restore recent community results
KBRASK Nov 18, 2026
4f1fbcb
Image view: Open folder says so and names the folder when it cannot b…
KBRASK Nov 18, 2026
c92196e
Studio: a report saved from the status line says so in the shared not…
KBRASK Nov 18, 2026
87f836c
Launcher: an incomplete installation file now says what to do and ope…
KBRASK Nov 18, 2026
c27aa36
The computer no longer goes to sleep on its own while a video is bein…
KBRASK Nov 18, 2026
21fc638
Image generation: several pictures can wait in line, status reports t…
KBRASK Nov 18, 2026
095daed
Cache and compress the page's files for remote visits
KBRASK Nov 18, 2026
02ab585
Setup check ignores an empty or damaged saved record, names the file,…
KBRASK Nov 18, 2026
72e6be5
Create panel: the prompt box grows with its text up to 170 px (120 px…
KBRASK Nov 18, 2026
18148f0
Deleting a work for good also removes its report number from the repo…
KBRASK Nov 18, 2026
a2d63b2
Editor: when a continued part finishes generating, the next part is r…
KBRASK Nov 18, 2026
8a345ee
Phones: Creations in the top bar is the works entry; drop the duplica…
KBRASK Nov 18, 2026
d628b19
Touch: keep drawn widths of top-bar links and steppers, grow only the…
KBRASK Nov 18, 2026
7bb8f13
Media tray: keep the use box clear on narrow tiles; Edited becomes a …
KBRASK Nov 18, 2026
876decd
Add MOSS-Image to image generation: picker entry, one-click install, …
KBRASK Nov 18, 2026
736c9dd
Library and sharing: a folder that cannot be read, a video that canno…
KBRASK Nov 18, 2026
d74f4b3
Assistant chat: Tab stays inside the drawer and dialogs, one Technica…
KBRASK Nov 18, 2026
81878ab
Autopilot connection light opens a menu: Reconnect is the main action…
KBRASK Nov 18, 2026
1594a8b
The works library opens the folder that holds the videos: a Video fol…
KBRASK Nov 18, 2026
0746bd9
Comment: the opening screen follows only the FreeVideo launcher's visit
KBRASK Nov 18, 2026
07e5057
Prompt enhancement: a failed rewrite's memory readings also name wher…
KBRASK Nov 18, 2026
bddd974
Make the editor comfortable on touch screens wider than a phone
KBRASK Nov 18, 2026
0a5b3f0
Use the full height of tall portrait windows
KBRASK Nov 18, 2026
b02a4e3
New character, Upload images: each of the four views takes a picture …
KBRASK Nov 18, 2026
defdd11
Agent: audio used as it is can continue a saved video
KBRASK Nov 18, 2026
3cb336c
Image editor: on a narrow screen every tool's options fit the window …
KBRASK Nov 18, 2026
0148853
Managed ComfyUI keeps no file names in its logs: old run folders are …
KBRASK Nov 18, 2026
d151ced
The editor's generation bar is the creation panel's own bar: the same…
KBRASK Nov 18, 2026
b890ada
Launcher: an unexpected failure says what kind of problem it was and …
KBRASK Nov 18, 2026
9a7dd68
Clear the loading skeleton on a failed library read and give Retry th…
KBRASK Nov 18, 2026
9e7fea1
Studio history rail: a failed library read shows a mark that names it…
KBRASK Nov 18, 2026
713259f
Prompt enhancement: Generate pressed while a rewrite runs says why it…
KBRASK Nov 18, 2026
5423fe2
Top bar takeover keeps the tabs in place, so the editor's focused tab…
KBRASK Nov 18, 2026
c5d68ad
Editor: a shared menu opened in it gets its own keys, so Esc closes a…
KBRASK Nov 18, 2026
461a46c
Narrow editor: track names centred in the 64 px column again, so "Sub…
KBRASK Nov 18, 2026
76c8593
Launcher: read CUDA_VISIBLE_DEVICES by CUDA's rules (index, UUID, uni…
KBRASK Nov 18, 2026
94e29eb
Editor on narrow windows: the project menu opens under the name again…
KBRASK Nov 18, 2026
d9f7d58
Editor timeline: jumping with the arrow keys keeps the play line in view
KBRASK Nov 18, 2026
541ea38
Editor timeline: near time zero the playhead grip stays clear of the …
KBRASK Nov 18, 2026
633bbe2
Release notes: explain an unavailable version check and offer Retry
KBRASK Nov 18, 2026
5a41fe6
Launcher: switching the interface language also rewords the browser e…
KBRASK Nov 18, 2026
c215ea3
Studio queue: the first notice of a lost connection records whether t…
KBRASK Nov 18, 2026
bdd6f6b
Launcher: the Chinese message shown when the browser cannot be opened…
KBRASK Nov 18, 2026
6e0a15e
Editor timeline: a move that cannot go there shows its range in red a…
KBRASK Nov 18, 2026
31c0ea3
Editor: Escape during a drag stops the drag and adds no undo step
KBRASK Nov 18, 2026
a470d55
Release notes: a failed retry keeps the last result; empty-state text…
KBRASK Nov 18, 2026
f397193
Update dialog: failure buttons in one row under the reason; only a fu…
KBRASK Nov 18, 2026
d7d3a9f
Editor: failed part card is fully opaque
KBRASK Nov 18, 2026
8bd0f80
Failure card: formal wording for the unknown-cause note and next step
KBRASK Nov 18, 2026
38f281d
Editor: on narrow screens the generation bar's buttons share the 44 p…
KBRASK Nov 18, 2026
9a34718
Editor: while a failed block's card is open, the failure line above t…
KBRASK Nov 18, 2026
ef9adc4
Picture page failure card: the reason and its buttons keep their plac…
KBRASK Nov 18, 2026
c678591
Picture page references: each tile shows its number in a small badge …
KBRASK Nov 18, 2026
2191c59
The phone page files include the glass skin phone.js loads, so the pa…
KBRASK Nov 18, 2026
084e893
Editor: the progress word beside Generate stays whole
KBRASK Nov 18, 2026
23dca42
Entry test: leave out the style-state mirror freevideo.js now imports…
KBRASK Nov 18, 2026
53511c7
Editor on narrow screens: a note above the description grows the gene…
KBRASK Nov 18, 2026
af242fe
Editor: the empty-description question stands right over Generate at …
KBRASK Nov 18, 2026
064ee86
Image failure card: a failure without a reason of its own names the s…
KBRASK Nov 18, 2026
2ceb2c4
Settings: Retry and Report a problem under the release notes are the …
KBRASK Nov 18, 2026
b8d077a
Editor: floating menus, popovers and sheets are solid, not see-through
KBRASK Nov 18, 2026
c0eed1b
Editor: the Fill/Fit switch over the picture is solid
KBRASK Nov 18, 2026
ffbf20f
Page check lists every shipped script, and the agent's editor runtime…
KBRASK Nov 18, 2026
2e971b2
Image editor: stopping while reference pictures are uploading removes…
KBRASK Nov 18, 2026
c376731
Launcher update notes: in a narrow window a long label is cut short a…
KBRASK Nov 18, 2026
95f0785
Touch screens: image view buttons, chips and fields are at least 44 p…
KBRASK Nov 18, 2026
7084c2e
Tour and tutorial examples that cannot be filled in say why and what …
KBRASK Nov 18, 2026
3412372
Run second pass: when it does not start, the tooltip and the report c…
KBRASK Nov 18, 2026
78e77c4
Create panel: the console keeps the picture's width only until they p…
KBRASK Nov 18, 2026
b326bbf
Create panel: the duration's lock sits inside the number, so the butt…
KBRASK Nov 18, 2026
e18a1b2
Editor: leaving the edit view stops a source preview, and a preview o…
KBRASK Nov 18, 2026
b2c6d30
Failure card: when the request is refused at once on this computer, s…
KBRASK Nov 18, 2026
f5ba653
Editor export: a planned part that was never sent is not exported, so…
KBRASK Nov 18, 2026
1479723
Release 0.6.3: update notes
KBRASK Nov 18, 2026
9dc7a5a
Edit view guide steps point at the borrowed generation bar
KBRASK Nov 18, 2026
8e6fa3c
The editor's generation bar shows the selected part's description and…
KBRASK Nov 18, 2026
8c037fd
Editor: the creation panel gets its own text back when the editor rel…
KBRASK Nov 18, 2026
2a25036
Editor: the borrowed generation bar sends the work's own first-frame …
KBRASK Nov 18, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ async def comfy_entrypoint():
except Exception as error:
import logging
logging.warning('[FreeVideo] Opening screen not registered: %s', error)
try:
# The page's files once, compressed, then checked again instead of downloaded again on every visit.
from .freevideo_engine.web_cache import register as page_cache
page_cache()
except Exception as error:
import logging
logging.warning('[FreeVideo] Page file caching not registered: %s', error)
from .freevideo_engine.comfy_launcher_api import register as launcher_routes
launcher_routes()
from .freevideo_engine.comfy_updates import register as update_routes
Expand Down
6 changes: 3 additions & 3 deletions freevideo_engine/access_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

PHONE_WEB = Path(__file__).resolve().parents[1] / 'web'
PHONE_FILE = re.compile(r'[A-Za-z0-9_][A-Za-z0-9_.-]*\.(?:js|css)')
PHONE_ASSETS = ('assets/freevideo.svg', 'assets/freevideo-light.svg')
PHONE_ASSETS = ('assets/freevideo.svg', 'assets/freevideo-light.svg', 'glass/library.js', 'glass/library.css')
PHONE_TYPES = {'.js': 'text/javascript', '.css': 'text/css', '.svg': 'image/svg+xml'}
# Inline like the password page: installed packages only carry .js/.css/.svg under web/.
PHONE_PAGE = (
Expand Down Expand Up @@ -77,7 +77,7 @@ def password_page(request, *, error='', retry_after=0, status=401):


def phone_file(path, root=None):
"""The page file /m/<name> stands for: .js/.css directly inside web/ and the two wordmark SVGs (/m/ itself is PHONE_PAGE)."""
"""The page file /m/<name> stands for: .js/.css directly inside web/, the two wordmark SVGs and the glass skin phone.js loads (/m/ itself is PHONE_PAGE)."""
root = (root or PHONE_WEB).resolve()
name = path[len('/m/'):]
if not (PHONE_FILE.fullmatch(name) or name in PHONE_ASSETS):
Expand All @@ -86,7 +86,7 @@ def phone_file(path, root=None):
found = (root / name).resolve(strict=True)
except (OSError, RuntimeError):
return None
return found if found.parent in (root, root / 'assets') and found.is_file() else None
return found if found.parent in (root, root / 'assets', root / 'glass') and found.is_file() else None


def same_origin(request):
Expand Down
185 changes: 181 additions & 4 deletions freevideo_engine/agent/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,14 @@ def safe_details(value):
return '[redacted]'


# Picture-only codes: the people-facing sentence is the picture card's own (IMAGE_REASONS), word for word.
IMAGE_ONLY = ('small_memory', 'busy_video', 'model_unreadable', 'device_unavailable')
# Program-facing codes: only an Agent or a command-line client meets them, never a person as a task's failure.
PROTOCOL_ONLY = ('forbidden', 'redirect_forbidden', 'method_not_allowed', 'unauthorized', 'no_token', 'invalid_json',
'unsupported_media_type', 'idempotency_conflict', 'invalid_range', 'invalid_wait', 'invalid_resume',
'invalid_library_id', 'invalid_capabilities_query')


# One public sentence shared by conversation cards, HTTP and MCP. Backend text
# is classified, never echoed: it can contain prompts, filenames or credentials.
FAILURE_REASONS_ZH = {
Expand Down Expand Up @@ -349,8 +357,61 @@ def safe_details(value):
'chain_too_long': '接续后的视频超过了支持的段数',
'chain_short_parts': '有短于 10 秒的段时,接续后的视频超过了支持的段数',
'chain_rejected': '生成服务无法使用这组参数',
'generation_failed': '生成没有完成',
'internal_error': '没有完成',
'generation_failed': '生成过程中出现了意外错误',
'internal_error': '处理过程中出现了意外错误',
'unreachable': 'FreeVideo 服务没有响应',
'session_full': '这个对话的消息已达到上限',
'page_session_required': '页面会话已失效',
'origin_forbidden': '这次操作来自其他网址,已被拒绝',
'local_only': '这项操作只能在运行 FreeVideo 的电脑上进行',
'page_required': '这项操作需要在浏览器中打开 FreeVideo 页面',
'unsupported_comfyui': '已安装的生成组件版本不受支持',
'busy': '另一项任务正在占用所需的资源',
'conflict': '这项操作与任务的当前状态冲突',
'no_video': '来源任务还没有生成完成的视频',
'invalid_edit': '图片编辑的设置有误',
'invalid_screenplay': '剧本中有不符合要求的内容',
'invalid_seed': '图片的随机种子超出了支持的范围',
'image_size': '图片超过了 5000 万像素的上限',
'unsupported_media': '读取画面的模型只能读取图片',
'unknown_shot': '找不到这个镜头',
'unknown_take': '这个镜头中找不到指定的那一条',
'take_not_ready': '这一条已过期或没有生成成功',
'chosen_by_user': '这个镜头已手动选定,不会自动更改',
'nothing_to_cancel': '没有可以取消的未完成任务',
'not_allowed': '这部短剧只能在页面上手动停止或继续',
'already_ended': '这部短剧已经结束',
'needs_confirmation': '这项操作需要先确认',
'declined_by_user': '这项操作已被拒绝',
'turn_abandoned': '这次请求已被放弃',
'managed_by_production': '这一条属于一部短剧,不能单独继续生成',
'stale_revision': '卡片在读取后已有改动',
'changed_by_user': '这部分内容已被手动修改',
'card_in_use': '有未完成的短剧正在使用这张卡片',
'already_generating': '这张卡片的参考图正在生成',
'project_changed': '项目在读取后已有改动',
'image_changed': '图片在读取后已有改动',
'clip_busy': '这次操作涉及的片段还在生成',
'clip_locked': '这次操作涉及的片段在已锁定的轨道上',
'layer_locked': '这次操作要修改已锁定的图层',
'audio_full': '这里没有空闲的声音轨',
'overlap': '这次操作会与不能移动的片段重叠',
'missing_glyphs': '项目中的文字含有内置字体无法显示的字符',
'clip_source_unusable': '有片段的源文件缺失,或在片段使用的范围内无法读取',
'shorten_unavailable': '这里暂时不能自动缩短台词',
'no_speech_model': '这台电脑上没有安装语音识别模型',
'speech_language': '语音识别模型不支持这段声音的语言',
'listen_failed': '识别台词时中途出错',
'music_download_failed': '配乐模型未能下载',
'music_failed': '生成配乐时中途出错',
'stems_download_failed': '声音分离模型未能下载',
'stems_failed': '分离声音时中途出错',
'sound_failed': '处理成片声音时中途出错',
'voice_failed': '更换人声时中途出错',
'voice_model_missing': '配音模型还没有安装好',
'no_speech': '所选范围内没有找到说话声',
# Image-only codes keep the sentences the picture card already shows.
**{code: IMAGE_REASONS[code][1] for code in IMAGE_ONLY},
}
FAILURE_REASONS_EN = {
**LORA_MESSAGE_EN,
Expand Down Expand Up @@ -403,8 +464,116 @@ def safe_details(value):
'chain_too_long': 'The continued video has more parts than supported',
'chain_short_parts': 'With a part shorter than 10 seconds, the continued video has more parts than supported',
'chain_rejected': 'The generation service cannot use these settings',
'generation_failed': 'Generation did not finish',
'internal_error': 'Did not finish',
'generation_failed': 'An unexpected error stopped generation',
'internal_error': 'An unexpected error stopped this task',
'unreachable': 'The FreeVideo service did not respond',
'session_full': 'This chat has reached its message limit',
'page_session_required': 'The page session is no longer valid',
'origin_forbidden': 'This action came from a different web address and was refused',
'local_only': 'This action is available only on the computer running FreeVideo',
'page_required': 'This action needs the FreeVideo page open in a browser',
'unsupported_comfyui': 'The installed generation component version is not supported',
'busy': 'Another task is using the resources this one needs',
'conflict': 'This action conflicts with the current state of the task',
'no_video': 'The source task has no finished video yet',
'invalid_edit': 'The image edit settings are invalid',
'invalid_screenplay': 'The screenplay contains invalid content',
'invalid_seed': 'The picture seed is outside the supported range',
'image_size': 'The image exceeds the 50-megapixel limit',
'unsupported_media': 'The model that reads pictures can read only images',
'unknown_shot': 'This shot cannot be found',
'unknown_take': 'The chosen take cannot be found in this shot',
'take_not_ready': 'This take is out of date or did not succeed',
'chosen_by_user': 'This shot was chosen by hand and is not changed automatically',
'nothing_to_cancel': 'There is no unfinished task to cancel',
'not_allowed': 'This short film can be stopped or continued only by hand on the page',
'already_ended': 'This short film has already ended',
'needs_confirmation': 'This action needs approval first',
'declined_by_user': 'This action was declined',
'turn_abandoned': 'This request was abandoned',
'managed_by_production': 'This take belongs to a short film and cannot be continued on its own',
'stale_revision': 'The card has changed since it was read',
'changed_by_user': 'This part was changed by hand',
'card_in_use': 'An unfinished short film uses this card',
'already_generating': 'Reference pictures for this card are already being made',
'project_changed': 'The project has changed since it was read',
'image_changed': 'The image has changed since it was read',
'clip_busy': 'A clip in this action is still generating',
'clip_locked': 'A clip in this action is on a locked track',
'layer_locked': 'This action changes a locked layer',
'audio_full': 'There is no free sound track here',
'overlap': 'This action would overlap clips that cannot move',
'missing_glyphs': 'Text in the project contains characters the built-in fonts cannot display',
'clip_source_unusable': 'A clip\'s source file is missing, or cannot be read over the part the clip uses',
'shorten_unavailable': 'Lines cannot be shortened automatically here yet',
'no_speech_model': 'No speech recognition model is installed on this computer',
'speech_language': 'The speech recognition model does not support the language of this sound',
'listen_failed': 'An error stopped recognizing the lines',
'music_download_failed': 'The music model could not be downloaded',
'music_failed': 'An error stopped composing the music',
'stems_download_failed': 'The sound separation model could not be downloaded',
'stems_failed': 'An error stopped separating the sound',
'sound_failed': 'An error stopped finishing the sound of the cut',
'voice_failed': 'An error stopped changing the voice',
'voice_model_missing': 'The dubbing model is not installed yet',
'no_speech': 'No speech was found in the selection',
**{code: IMAGE_REASONS[code][0] for code in IMAGE_ONLY},
}
# What a person can do next, for the reasons above whose remedy is not just running the task again. Shown after the
# reason only while the reason itself is the code's sentence (a more specific message keeps its own meaning).
FAILURE_NEXT_ZH = {
'generation_failed': '再次出现时,请点击“提交问题”',
'internal_error': '再次出现时,请点击“提交问题”',
'unreachable': '确认 FreeVideo 已经启动后再试',
'session_full': '点击“新对话”后继续',
'page_session_required': '刷新页面后再操作一次',
'origin_forbidden': '在 FreeVideo 提供的页面中操作',
'unsupported_comfyui': '在启动器或设置中修复安装',
'busy': '等该任务完成后再试',
'no_video': '等来源视频生成完成后再试',
'image_size': '缩小图片后再试',
'managed_by_production': '重拍这个镜头,或继续这部短剧',
'already_generating': '等参考图生成完成后再试',
'clip_busy': '等片段生成完成后再试',
'clip_locked': '解锁该轨道后再试',
'layer_locked': '解锁该图层后再试',
'audio_full': '先挪开或删除这里的一段声音',
'overlap': '换一个位置,或先挪开挡住的片段',
'missing_glyphs': '修改这些文字后再导出',
'clip_source_unusable': '找回或替换源文件后再导出',
'shorten_unavailable': '手动改写较短的台词',
'no_speech_model': '请手动填写字幕',
'music_download_failed': '配乐模型需要约 20 GB 磁盘空间和网络连接,确认后再试',
'stems_download_failed': '检查网络连接后再试',
'voice_model_missing': '先安装配音模型',
'no_speech': '选择有人说话的一段声音',
}
FAILURE_NEXT_EN = {
'generation_failed': 'If it happens again, use "Report a problem"',
'internal_error': 'If it happens again, use "Report a problem"',
'unreachable': 'Make sure FreeVideo is running, then try again',
'session_full': 'Click "New chat" to continue',
'page_session_required': 'Reload the page and repeat the action',
'origin_forbidden': 'Use the page served by FreeVideo',
'unsupported_comfyui': 'Repair the installation in the launcher or in Settings',
'busy': 'Try again when that task finishes',
'no_video': 'Try again after the source video finishes',
'image_size': 'Make the image smaller, then try again',
'managed_by_production': 'Reshoot this shot, or continue the short film',
'already_generating': 'Try again when the reference pictures are finished',
'clip_busy': 'Try again when the clip finishes generating',
'clip_locked': 'Unlock the track, then try again',
'layer_locked': 'Unlock the layer, then try again',
'audio_full': 'Move or remove a sound clip here first',
'overlap': 'Choose another position, or move the clips in the way first',
'missing_glyphs': 'Change that text, then export again',
'clip_source_unusable': 'Restore or replace the source file, then export again',
'shorten_unavailable': 'Write a shorter line by hand',
'no_speech_model': 'Write the subtitles by hand',
'music_download_failed': 'The music model needs about 20 GB of free disk space and a network connection; check both, then try again',
'stems_download_failed': 'Check the network connection, then try again',
'voice_model_missing': 'Install the dubbing model first',
'no_speech': 'Choose a stretch of sound with someone speaking',
}
FAILURE_MESSAGES_ZH = {
'The previous video is too short to continue; it needs to be at least 1.7 s long.': '接续的上一段视频太短,至少需要 1.7 秒',
Expand Down Expand Up @@ -447,13 +616,21 @@ def failure_reason_en(error):
return FAILURE_REASONS_EN.get(error.get('code'), 'Did not finish')


# The people-facing fields reasons() writes; next_zh/next_en only when the reason has a next step.
REASON_KEYS = ('error_zh', 'error_en', 'next_zh', 'next_en')


def reasons(error):
from ..other_usage import fact, join
result = dict(error_zh=failure_reason(error), error_en=failure_reason_en(error))
code = error.get('code')
step = code in FAILURE_NEXT_ZH and result['error_zh'] == FAILURE_REASONS_ZH.get(code)
for key, zh in (('error_zh', True), ('error_en', False)):
suffix = fact(error.get('other_usage'), zh=zh)
if suffix and suffix not in result[key]:
result[key] = join(result[key], suffix, zh=zh)
if step:
result.update(next_zh=FAILURE_NEXT_ZH[code], next_en=FAILURE_NEXT_EN[code])
return result


Expand Down
2 changes: 1 addition & 1 deletion freevideo_engine/agent/guide.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
'Tags are numbered per kind in reference order: <Picture 1>, <Picture 2>, <Video 1>, <Audio 1>. '
'For keyframes the first frame is <Picture 1> and the last frame the next picture.',
'A reference video marked voice_only is an audio reference: its sound is <Audio N> and it has no <Video N> tag.',
'An audio reference with use "original" (and an optional range in samples) is used as the soundtrack as it is: the video is as long as the selected audio (seconds may be left out and is ignored; continue_from, part_prompts and editor parts cannot be combined with it, and shot cuts are checked against the audio length), and only one audio file can be used this way. Without use it is a voice reference, as before.',
'An audio reference with use "original" (and an optional range in samples) is used as the soundtrack as it is: the video is as long as the selected audio (seconds may be left out and is ignored; part_prompts and editor parts cannot be combined with it, and shot cuts are checked against the audio length), and only one audio file can be used this way. With continue_from the selected audio is the part that is added: the range must start at least 1 second into the file, because the first second of the part overlaps the saved video, and the audio is used as it is from the range start on; at most 3 pictures may accompany it. first_frame_reference is ignored with it (plan and submit say so). Without use it is a voice reference, as before.',
'Name subjects <Subject 1>, <Subject 2> in subject_definitions and reuse those labels in every section.',
'Clips are cut to the generated length (at most 15 s); the job result lists any cut.',
],
Expand Down
Loading