Skip to content

Make GPU tools run to completion - #37

Merged
nasser1941 merged 1 commit into
mainfrom
fix/free-gpu-wait
Oct 1, 2026
Merged

nasser1941 merged 1 commit into
mainfrom
fix/free-gpu-wait

Conversation

@nasser1941

Copy link
Copy Markdown
Owner

Found in the 0.6.0 manual test.

The problem: the model started a ComfyUI workflow with run_workflow(wait: false), then polled with job. The GPU hand-off didn't hold: lcode's model reloaded for the next step while ComfyUI was still generating, so they competed for the 12 GB GPU. This time ComfyUI happened to finish during the reload.

The fix: for tools marked free_gpu that take a boolean wait, lcode now always sends wait: true. The job finishes before lcode's model comes back.

  • Test: test_gpu_tools_run_to_completion.
  • Checks: the full suite and ruff pass, and the change was scanned with gitleaks.

The rest of the 0.6.0 manual test passed, with the PyPI build:

  • doctor shows the vision model.
  • The headline of an attached image was quoted exactly.
  • lcode mcp add comfyui connected (17 tools, free_gpu set).
  • A FLUX.2 Klein icon was generated from a saved workflow, and the GPU was freed first.
  • The Homebrew tap bumped itself to 0.6.0.

🤖 Generated with Claude Code

In the 0.6.0 manual test the model started a ComfyUI workflow with
wait: false. The GPU hand-off then didn't hold: lcode's model reloaded for
the next step while ComfyUI was still generating, and they competed for the
GPU (it happened to finish in time). For tools marked free_gpu that take a
boolean `wait`, lcode now always sends wait: true.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nasser1941
nasser1941 merged commit 2218bee into main Oct 1, 2026
12 checks passed
@nasser1941
nasser1941 deleted the fix/free-gpu-wait branch October 1, 2026 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant