Repository navigation
Check the prompt or conditioning file before planning a generation - #79
Open
ischencheng wants to merge 1 commit into
Open
ischencheng wants to merge 1 commit into
ischencheng wants to merge 1 commit into
Conversation
generate copied --prompt-file and --conditioning only after GPU detection, planning and creating <out>.artifacts. A mistyped, missing or empty input failed there and left that directory behind, so every retry with the same --out stopped at FileExistsError until the directory was deleted by hand. Read the prompt (UTF-8, nonempty) or check the conditioning file right after argument parsing instead, before anything is created.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change
generatereads--prompt-fileand--conditioningonly after GPU detection, planning andartifacts.mkdir(exist_ok=False). A mistyped path, an empty prompt or a non-UTF-8 file fails there and leaves<out>.artifactsbehind. After fixing the path, every retry with the same--outstops atuntil the directory is deleted by hand.
This checks the input right after argument parsing. The prompt is read as UTF-8 and must be nonempty (same message as the encoder worker and the Mac path).
--conditioningmust be a file. Nothing is created when the check fails.exist_ok=Falseand the artifacts kept from real attempts are unchanged. The check runs before the macOS dispatch, so the Mac path, which creates<out>.artifactsfirst, gets it too.Validation
Linux on a Modal L4 (sm89), driver 580.95.05, torch 2.13.0+cu130, Python 3.12,
pip install --no-deps -e .. Compared main 5f26105 with this branch. The container has no models and did not run setup, so retries end at the encoder child. What matters here is whether a retry gets past<out>.artifacts.Each step runs
python -m freevideo_engine generate ... --cache <stub fp8 manifest> --width 768 --height 448 --seconds 2:--prompt-file promt.txt(typo)FileNotFoundErrorafter 4.3 s (detection + planning), leavesfox.artifacts/FileNotFoundErrorafter 0.16 s, nothing createdprompt.txt, same--outFileExistsError: .../fox.artifacts--prompt-file empty.txtblank.artifacts/ValueError: A nonempty prompt is requiredafter 0.14 s--outFileExistsError: .../blank.artifacts--conditioning conditioning.pt(missing)FileNotFoundErrorafter 4.0 s, leavescond.artifacts/FileNotFoundError: Conditioning file not foundafter 0.14 s--outFileExistsError: .../cond.artifactsIn this container the encoder child then stops with "Worker memory monitoring is incomplete", because the gVisor sandbox has no
/proc/self/smaps_rollup. Both branches behave the same there. Readingencode_worker.py, on a normal host the empty prompt would stop at the worker's nonempty check instead, still after<out>.artifactsexists.Also ran locally (macOS):
python scripts/check_installation.py,bash -n setup.sh test.sh freevideo scripts/bootstrap_linux.sh,./freevideo --helpandgenerate --help. A GBK-encoded prompt now fails at once withUnicodeDecodeError.Not run: a full generation, and the Mac app path. On macOS I only checked that the new check fires before dispatch.
Repro