Skip to content

Comments

feat: Wan2GP v10.83 + LTX-2 19B + IC LoRA + Uni3C + 1817-test suite#20

Open
peteromallet wants to merge 41 commits intomainfrom
codex/pr19-layered-port
Open

feat: Wan2GP v10.83 + LTX-2 19B + IC LoRA + Uni3C + 1817-test suite#20
peteromallet wants to merge 41 commits intomainfrom
codex/pr19-layered-port

Conversation

@peteromallet
Copy link
Collaborator

Summary

Layered port of PR #19 (Wan2GP v10.83 + LTX-2 19B + IC LoRA) with additional fixes, Uni3C restoration, and a comprehensive test suite.

  • Wan2GP v10.83 sync — upstream model management API changes (apply_changes → get_default_settings)
  • LTX-2 19B support — latent injection for multi-frame guide images, ltx2_ic_multiframe task type, IC LoRA + union control LoRA routing
  • Uni3C restoration — re-enables Uni3C path on top of v10.83, hard-fails on param drops, centralizes model settings apply
  • Travel VACE fix — restricts VACE detection to explicit vace models to avoid false positives
  • 1817-test suite — 113 test files covering task handlers, model management, media processing, queue lifecycle, params, logging, and utilities

Test plan

  • pytest tests/ — all 1817 tests pass
  • Travel pipeline smoke test (depth/pose/canny control)
  • LTX-2 IC LoRA generation end-to-end
  • Uni3C task type sanity check

🤖 Generated with Claude Code

xliry and others added 30 commits February 11, 2026 19:45
- Replace Wan2GP/ with upstream v10.83 (was v10.01, 82 versions behind)
- Add LTX-2 model detection (_is_ltx2) and task type registration
- Wire 12 new generate_video() params (audio_scale, self_refiner, etc.)
- Add image/audio path bridging: start_image/end_image → PIL, audio_input → audio_guide
- Auto-detect image_prompt_type (T/TS/TE/TSE) for LTX-2 models
- Add use_ltx2 toggle in travel_between_images.py with native keyframe anchoring
- Fix smoke mode stubs to handle ltx2/qwen model types
- Add comprehensive test suite (28 tests, all passing)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
WGP v10.83 removed the apply_changes() function - config is now applied
at module level during import. Updated headless_wgp.py to directly set
output paths on wgp module-level variables instead. Also added GPU test
script for LTX-2 19B validation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add per-phase integration status tables covering LTX-2 model support,
image anchoring, audio-driven video, and the Wan/LTX-2 toggle.
Also fix NameError for 'app' in wgp.py headless mode and add a
model download helper script.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
43 smoke tests (no GPU) covering orchestrator payload, segment assignment,
frame quantization, dependency chains, and stitch decisions.
Real GPU test generates actual LTX-2 video transitioning between test images.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
5 new test files (147 tests total, all passing):
- test_service_health.py: structural regression gate (set sizes, handler coverage, config health)
- test_all_services_headless.py: registration & model detection for all services
- test_wan_headless.py: WAN core services smoke tests (T2V, I2V, VACE, Flux, Hunyuan)
- test_ltx_headless.py: LTX family (LTXv + cross-model switching)
- test_task_conversion_headless.py: DB->GenerationTask pipeline & phase_config parsing

Also updates .gitignore to track all test files and adds tests/README.md.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…control

- Add ICLoraPipeline routing in ltx2.py (elif pipeline_kind == "ic_lora")
- Update ICLoraPipeline to accept stage_1_models/stage_2_models from WanGP
- Add _get_stage_model() helper, replace all model_ledger calls
- Add extra params (latent_conditioning_stage2, self_refiner_*) for compatibility
- Add TestICLoraAudioImageSmoke headless tests (signature + audio conditioning)
- Add ic_lora_audio_images test task template in create_test_task.py
- Add test_ic_lora_gpu.py with real GPU tests for all 3 IC LoRA types

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace Wan2GP/ with upstream v10.83 (was v10.01, 82 versions behind)
- Add LTX-2 model detection (_is_ltx2) and task type registration
- Wire 12 new generate_video() params (audio_scale, self_refiner, etc.)
- Add image/audio path bridging: start_image/end_image → PIL, audio_input → audio_guide
- Auto-detect image_prompt_type (T/TS/TE/TSE) for LTX-2 models
- Add use_ltx2 toggle in travel_between_images.py with native keyframe anchoring
- Fix smoke mode stubs to handle ltx2/qwen model types
- Add comprehensive test suite (28 tests, all passing)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
WGP v10.83 removed the apply_changes() function - config is now applied
at module level during import. Updated headless_wgp.py to directly set
output paths on wgp module-level variables instead. Also added GPU test
script for LTX-2 19B validation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add per-phase integration status tables covering LTX-2 model support,
image anchoring, audio-driven video, and the Wan/LTX-2 toggle.
Also fix NameError for 'app' in wgp.py headless mode and add a
model download helper script.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
43 smoke tests (no GPU) covering orchestrator payload, segment assignment,
frame quantization, dependency chains, and stitch decisions.
Real GPU test generates actual LTX-2 video transitioning between test images.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
5 new test files (147 tests total, all passing):
- test_service_health.py: structural regression gate (set sizes, handler coverage, config health)
- test_all_services_headless.py: registration & model detection for all services
- test_wan_headless.py: WAN core services smoke tests (T2V, I2V, VACE, Flux, Hunyuan)
- test_ltx_headless.py: LTX family (LTXv + cross-model switching)
- test_task_conversion_headless.py: DB->GenerationTask pipeline & phase_config parsing

Also updates .gitignore to track all test files and adds tests/README.md.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…control

- Add ICLoraPipeline routing in ltx2.py (elif pipeline_kind == "ic_lora")
- Update ICLoraPipeline to accept stage_1_models/stage_2_models from WanGP
- Add _get_stage_model() helper, replace all model_ledger calls
- Add extra params (latent_conditioning_stage2, self_refiner_*) for compatibility
- Add TestICLoraAudioImageSmoke headless tests (signature + audio conditioning)
- Add ic_lora_audio_images test task template in create_test_task.py
- Add test_ic_lora_gpu.py with real GPU tests for all 3 IC LoRA types

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
After syncing with upstream's structural refactoring (headless_wgp.py →
source/models/wgp/orchestrator.py), port all LTX-2 19B integration
changes to the new file location:

- Add _is_ltx2() detection method + generation_helpers implementation
- Update smoke mode stubs for ltx2/qwen model detection
- Add LTX-2 image/audio parameter bridging (start_image → image_start,
  audio_input → audio_guide, auto image_prompt_type detection)
- Add WGP v10.83 parameters: alt_prompt, duration_seconds, pause_seconds,
  audio_scale, input_video_strength, override_attention, custom_settings,
  top_k, self_refiner_* to both passthrough and normal mode param dicts

https://claude.ai/code/session_01UKvbJG5LnAyZi26P6Jztn8
… Evolution LoRA

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tests were referencing old source/task_types, source/task_conversion,
headless_wgp.py, and source/task_handlers/travel_between_images.py
paths that moved during upstream refactor. Also fix SupabaseClient
union type annotation for environments without supabase installed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace references to CICEK .png / 2AF816...jpeg with the available
1.jpg, 2.jpg, 3.jpg test fixtures.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…lora

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The section referenced old file paths (headless_wgp.py:774,
source/task_types.py, source/task_handlers/travel_between_images.py)
that no longer exist after the upstream refactor. Syncs README with
upstream at 9bb3102.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…d missing Path import

- orchestrator.py: upstream wgp.py removed apply_changes(); use
  get_default_settings + set_model_settings instead
- qwen_main.py: add missing Path and sys imports needed for PROJECT_ROOT

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
# Conflicts:
#	source/core/db/config.py
#	source/models/wgp/orchestrator.py
#	source/task_handlers/travel/orchestrator.py
Introduce model-aware parameterization so the travel pipeline supports
both Wan (grid=16, frame_step=4, fps=16) and LTX-2 (grid=64,
frame_step=8, fps=24) without breaking existing behavior.

Key changes:
- resolution_utils: add get_model_grid_size(), parameterize grid snapping
- orchestrator: replace hardcoded //4 quantization with _quantize_frames(frame_step),
  add model-aware FPS helpers, auto-disable SVI for LTX-2
- preflight: parameterize min_frames safety check (Wan=5, LTX-2=17)
- segment_processor: add LTX-2 TSEV prompt type builder
- stitch: model-aware FPS fallback, audio mux from segments
- ffmpeg_ops: add video_has_audio() and mux_audio_from_segments()
- task_registry: pass grid_size to snap_resolution_to_model_grid
- lora_utils: add ltx2 lora cleanup path

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The function was being called but never imported, causing all
phase_config-related tests to fail (11/147). It was likely missed
during the refactoring that moved it to source/core/params/.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…LoRA features

- headless_wgp.py: accept upstream 2-line facade (logic in source/models/wgp/)
- any2video.py, qwen_main.py, z_image_main.py: accept PR v10.83 sync
- travel_between_images.py: removed (upstream decomposed to source/task_handlers/travel/)
- Fix stale imports in tests: source.task_types → source.task_handlers.tasks.task_types,
  source.task_handlers.travel_between_images → source.task_handlers.travel.svi_config

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Conflicts resolved:
- headless_wgp.py: keep upstream 2-line facade
- any2video.py, qwen_main.py, z_image_main.py: keep PR v10.83 sync
- travel_between_images.py: removed (decomposed to travel/ package)
- Test files: use decomposed paths (orchestrator.py, task_registry.py, svi_config.py)
- .gitignore: keep generic glob patterns for test images

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add union control LoRA URL to ltx2_19B.json preload_URLs
- Update get_loras_transformer() to use single union LoRA when multiple
  control types requested (P+D, P+E, etc.), fallback to separate LoRAs
  for single control type
- Add smoke test (test_ltx2_pose_smoke.py) with AST-based verification
- Add workflow parameter reference (ltx2pose_params.py)
- Add GPU tests for pose workflow params and union control (PDVG)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace removed `apply_changes` API with `get_default_settings` + `set_model_settings` in orchestrator
- Add 12 missing v10.x parameters (alt_prompt, duration_seconds, audio_scale, self_refiner_*, etc.) to both passthrough and normal mode in wgp_params.py
- Fix union control LoRA 404 by correcting filename to `ltx-2-19b-ic-lora-union-control-ref0.5.safetensors`
- Fix NoneType crash in control_net_weight2 by moving defaults outside VACE-specific block
- Update test to search wgp_params.py after parameter refactor
- Update README with test results, bug fix log, IC-LoRA pipeline status

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Main README: minimal test section with run commands, link to tests/README.md
tests/README.md: compact summary with bug fixes, IC-LoRA insight, run instructions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implements a new ltx2_multiframe task type that generates video with 4
guide images at configurable frame positions via ComfyUI. Image 4 is
encoded directly into the latent (inplace), images 1-3 are guide
conditioning at specified frames.

New files:
- ltx2_multiframe_workflow.py: builds API-format ComfyUI workflow
- ltx2_multiframe_handler.py: task handler (download, upload, execute)
- ltx2_multiframe_params.py: reference parameters
- test_ltx2_multiframe_smoke.py: structure/wiring smoke tests
- test_ltx2_multiframe_gpu.py: GPU integration tests

Modified:
- comfy_utils.py: add upload_image() to ComfyUIClient
- task_types.py: register ltx2_multiframe model mapping
- task_registry.py: register handler in dispatch

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
xliry and others added 10 commits February 16, 2026 12:18
New ltx2_multiframe task type that supports N guide images at arbitrary
frame positions, reusing the existing latent injection mechanism.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…mages

Enables both structural control (pose/depth/canny via IC LoRA) and
multi-frame guide images at arbitrary frame positions in a single generation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Complete test coverage suite built alongside the PR19 layered port,
covering all major modules: task handlers, model management, media
processing, queue lifecycle, params, logging, and utilities.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add detailed logging throughout task processing pipeline to enable debugging
of stuck tasks and worker deadlocks:

Worker Loop Logging:
- Log each queue.get() attempt and retrieval with timing
- Track queue size every 10 iterations
- Log iteration count to detect if loop stops progressing
- Catch and log all exceptions including unexpected BaseException types
- Log when entering and exiting process_task_impl

Task Processing Logging:
- Log each phase (model switch, billing reset, generation) with timings
- Show phase completion status and duration

Lock Contention Logging:
- Log lock acquisition attempts on _wgp_patch_lock
- Track lock wait time and warn if wait > 100ms (possible contention)
- Log lock release to verify finally blocks execute

Generation Execution Logging:
- Log which generation path is used (VACE/Flux/T2V)
- Log generation call timing (elapsed time for each orchestrator.generate_*() call)
- Log timeout alarm setup and cancellation
- Capture full tracebacks for RuntimeError/ValueError/OSError

Exception Handling Improvements:
- Catch BaseException in worker loop to prevent silent deaths
- Log full tracebacks for all exceptions
- Mark unexpected exceptions as [CRITICAL] in logs

Finally Block Cleanup Logging:
- Log entry to finally block
- Track phase config and svi2pro restoration with timing
- Log timeout alarm cancellation

This logging will provide complete visibility into what the worker thread is doing
between tasks, enabling diagnosis of task hangs and queue stuck conditions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

4 participants