LTX-Desktop icon indicating copy to clipboard operation
LTX-Desktop copied to clipboard

Image + Audio generation fails with “Image conditioning CRF is unresolved (crf=None)” on both 2.3 Fast and 2.5 Fast (v1.2.0)

Open Monaro66 opened this issue 3 months ago • 6 comments

Environment

LTX DESKTOP UI, standalone version. App version: 1.2.0 Model tried: LTX 2.5 Fast and LTX 2.3 Fast OS: Windows 11 GPU: RTX 5090 32 GB VRAM System RAM: 32 GB

Originally LTX desktop auto updated, gave me errors from the beginning... Eventually I totally uninstalled it using revo uninstaller including any sub traces left, checked all directories for anything LTX and deleted... Did a fresh clean install using the current exe file from LTX desktop main web page.

Description When both an image and an audio file are loaded together, generation fails with this error on every resolution I tried (540p, 720p, 1080p) and with both JPG and PNG images.

{ "code": "HTTP_500", "message": "Image conditioning CRF is unresolved (crf=None). Resolve it against the checkpoint first -- ImageConditioner.resolve_crf(images), or detect_params(checkpoint_path).default_image_crf." }

What works Text prompt only → works Text + image (no audio) → works Text + audio (no image) → works

What fails Text + image + audio → always fails with the error above

I also tried switching between 2.5 Fast and 2.3 Fast — same result on both.

Additional notes Same API key I have used for months Model 2.5 is set to Active in the Models tab Happened after the automatic update to 1.2.0; clean re-install did not fix it

cheers :-)

Monaro66 avatar Aug 17 '26 05:08 Monaro66

I am experiencing the exact same issue on my Apple Silicon environment.

Environment

  • App Version: LTX Desktop UI v1.2.0 (Standalone)
  • OS: macOS
  • Hardware: MacBook Pro (M5 Pro chip, 64 GB Unified Memory)
  • Model: LTX 2.5 Fast (Local Inference via MPS)

Reproduced Behavior

  • Text prompt only -> Works fine
  • Text + Image (No Audio) -> Works fine
  • Text + Audio (No Image) -> Works fine
  • Text + Image + Audio -> Always fails with HTTP_500: Image conditioning CRF is unresolved (crf=None).

gomin90 avatar Aug 18 '26 06:08 gomin90

Same Issue

Environment LTX Desktop version: 1.2.0 OS: macOS (Apple Silicon, M4 Pro) Model: LTX 2.5 Fast Local generation (MPS backend) VRAM: 48 GB | Available RAM: 34 GB Text encoding: Local Encoder (Gemma 4-12B)

Adripal avatar Aug 18 '26 06:08 Adripal

The crash occurs inside ltx_pipelines/utils/media_io/decode.py within the preprocess function. When an audio file is combined with an image, the upstream pipeline routing fails to properly pass the resolved CRF metadata, causing crf is None to trigger a hard ValueError.

🛠️ Working Fix / Patch Proposal

Adding a defensive fallback inside decode.py gracefully prevents the crash and allows the pipeline to continue running using the historical standard CRF 29 while logging the event loudly.

I modified ltx_pipelines/utils/media_io/decode.py as follows, and it fixed the issue, allowing seamless multi-modal generation on my Apple Silicon machine:

def preprocess(image: np.array, crf: int) -> np.array:
    """Re-compress an image at ``crf`` to match the compression the model was trained on.
    ``crf`` is required: the correct value is a property of the model generation, so a
    code-level default here would silently condition on the wrong compression. Reaching this
    with ``crf=None`` means a conditioning skipped resolution -- see
    ``ImageConditioner.resolve_crf``, which every pipeline runs over its image inputs.
    """
    if crf is None:
        # Defensive fallback: some integration paths can still pass unresolved CRF.
        # Keep generation running with the historical default while logging loudly.
        logger.warning(
            "Image conditioning CRF is unresolved (crf=None); falling back to CRF 29. "
            "Upstream caller should resolve via ImageConditioner.resolve_crf(images)."
        )
        crf = 29
    if crf == 0:
        return image
    if min(image.shape[0], image.shape[1]) < 2:
        return image

    with BytesIO() as output_file:
        encode_single_frame(output_file, image, crf)
        video_bytes = output_file.getvalue()
    with BytesIO(video_bytes) as video_file:
        image_array = decode_single_frame(video_file)
    return image_array

Modifying this part makes it work normally as a temporary fix, but it is necessary to check and address why crf comes in as None. Please consider incorporating this or a similar defensive check in the upstream repository to prevent silent HTTP_500 crashes for end-users using audio-visual inputs.

gomin90 avatar Aug 18 '26 07:08 gomin90

The crash occurs inside ltx_pipelines/utils/media_io/decode.py within the preprocess function. When an audio file is combined with an image, the upstream pipeline routing fails to properly pass the resolved CRF metadata, causing crf is None to trigger a hard ValueError.

🛠️ Working Fix / Patch Proposal

Adding a defensive fallback inside decode.py gracefully prevents the crash and allows the pipeline to continue running using the historical standard CRF 29 while logging the event loudly.

I modified ltx_pipelines/utils/media_io/decode.py as follows, and it fixed the issue, allowing seamless multi-modal generation on my Apple Silicon machine:

def preprocess(image: np.array, crf: int) -> np.array: """Re-compress an image at crf to match the compression the model was trained on. crf is required: the correct value is a property of the model generation, so a code-level default here would silently condition on the wrong compression. Reaching this with crf=None means a conditioning skipped resolution -- see ImageConditioner.resolve_crf, which every pipeline runs over its image inputs. """ if crf is None: # Defensive fallback: some integration paths can still pass unresolved CRF. # Keep generation running with the historical default while logging loudly. logger.warning( "Image conditioning CRF is unresolved (crf=None); falling back to CRF 29. " "Upstream caller should resolve via ImageConditioner.resolve_crf(images)." ) crf = 29 if crf == 0: return image if min(image.shape[0], image.shape[1]) < 2: return image

with BytesIO() as output_file:
    encode_single_frame(output_file, image, crf)
    video_bytes = output_file.getvalue()
with BytesIO(video_bytes) as video_file:
    image_array = decode_single_frame(video_file)
return image_array

Modifying this part makes it work normally as a temporary fix, but it is necessary to check and address why crf comes in as None. Please consider incorporating this or a similar defensive check in the upstream repository to prevent silent HTTP_500 crashes for end-users using audio-visual inputs.

thank you that sorted it for me......cheers :-)

Monaro66 avatar Aug 18 '26 22:08 Monaro66

🛠️ Working Fix / Patch Proposal

Adding a defensive fallback inside decode.py gracefully prevents the crash and allows the pipeline to continue running using the historical standard CRF 29 while logging the event loudly.

thanks mate...helped me as well!

Henninges avatar Aug 19 '26 10:08 Henninges

Fixed in 1.2.4

bureyburey avatar Aug 19 '26 14:08 bureyburey