openchar-core 1.3.17__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- openchar_core-1.3.17/.gitignore +24 -0
- openchar_core-1.3.17/.python-version +1 -0
- openchar_core-1.3.17/CLAUDE.md +357 -0
- openchar_core-1.3.17/PKG-INFO +298 -0
- openchar_core-1.3.17/README.md +228 -0
- openchar_core-1.3.17/main.py +93 -0
- openchar_core-1.3.17/pyproject.toml +176 -0
- openchar_core-1.3.17/scripts/flux2_train_matrix.py +204 -0
- openchar_core-1.3.17/scripts/minimax_h3_lora_check.py +145 -0
- openchar_core-1.3.17/scripts/minimax_h3_train_matrix.py +206 -0
- openchar_core-1.3.17/scripts/reference.py +65 -0
- openchar_core-1.3.17/src/inline_core/__init__.py +14 -0
- openchar_core-1.3.17/src/inline_core/characters/__init__.py +35 -0
- openchar_core-1.3.17/src/inline_core/characters/apply.py +311 -0
- openchar_core-1.3.17/src/inline_core/characters/charfile.py +270 -0
- openchar_core-1.3.17/src/inline_core/characters/encode.py +821 -0
- openchar_core-1.3.17/src/inline_core/characters/library.py +152 -0
- openchar_core-1.3.17/src/inline_core/characters/scoring.py +591 -0
- openchar_core-1.3.17/src/inline_core/characters/sweep.py +282 -0
- openchar_core-1.3.17/src/inline_core/characters/verify.py +194 -0
- openchar_core-1.3.17/src/inline_core/characters/weights.py +99 -0
- openchar_core-1.3.17/src/inline_core/components/__init__.py +1 -0
- openchar_core-1.3.17/src/inline_core/components/conditioning.py +20 -0
- openchar_core-1.3.17/src/inline_core/components/interfaces.py +91 -0
- openchar_core-1.3.17/src/inline_core/config.py +81 -0
- openchar_core-1.3.17/src/inline_core/device/__init__.py +1 -0
- openchar_core-1.3.17/src/inline_core/device/auto.py +35 -0
- openchar_core-1.3.17/src/inline_core/device/detect.py +199 -0
- openchar_core-1.3.17/src/inline_core/device/memory.py +374 -0
- openchar_core-1.3.17/src/inline_core/device/policy.py +171 -0
- openchar_core-1.3.17/src/inline_core/device/probe.py +76 -0
- openchar_core-1.3.17/src/inline_core/device/types.py +31 -0
- openchar_core-1.3.17/src/inline_core/errors.py +42 -0
- openchar_core-1.3.17/src/inline_core/extensions/__init__.py +10 -0
- openchar_core-1.3.17/src/inline_core/extensions/api.py +214 -0
- openchar_core-1.3.17/src/inline_core/extensions/constraints.py +180 -0
- openchar_core-1.3.17/src/inline_core/extensions/fetch.py +196 -0
- openchar_core-1.3.17/src/inline_core/extensions/handlers.py +144 -0
- openchar_core-1.3.17/src/inline_core/extensions/importer.py +91 -0
- openchar_core-1.3.17/src/inline_core/extensions/install.py +669 -0
- openchar_core-1.3.17/src/inline_core/extensions/loader.py +285 -0
- openchar_core-1.3.17/src/inline_core/extensions/manifest.py +361 -0
- openchar_core-1.3.17/src/inline_core/extensions/models.py +58 -0
- openchar_core-1.3.17/src/inline_core/extensions/paths.py +235 -0
- openchar_core-1.3.17/src/inline_core/extensions/resolve.py +298 -0
- openchar_core-1.3.17/src/inline_core/extensions/scanner.py +448 -0
- openchar_core-1.3.17/src/inline_core/extensions/state.py +168 -0
- openchar_core-1.3.17/src/inline_core/extensions/tools.py +138 -0
- openchar_core-1.3.17/src/inline_core/ffmpeg.py +30 -0
- openchar_core-1.3.17/src/inline_core/graph/__init__.py +1 -0
- openchar_core-1.3.17/src/inline_core/graph/cache.py +138 -0
- openchar_core-1.3.17/src/inline_core/graph/descriptor.py +88 -0
- openchar_core-1.3.17/src/inline_core/graph/executor.py +114 -0
- openchar_core-1.3.17/src/inline_core/graph/loader_runners.py +131 -0
- openchar_core-1.3.17/src/inline_core/graph/primitives.py +160 -0
- openchar_core-1.3.17/src/inline_core/graph/registry.py +97 -0
- openchar_core-1.3.17/src/inline_core/graph/runners.py +90 -0
- openchar_core-1.3.17/src/inline_core/graph/schema.py +161 -0
- openchar_core-1.3.17/src/inline_core/graph/topo.py +49 -0
- openchar_core-1.3.17/src/inline_core/graph/validate.py +56 -0
- openchar_core-1.3.17/src/inline_core/media.py +11 -0
- openchar_core-1.3.17/src/inline_core/models/__init__.py +8 -0
- openchar_core-1.3.17/src/inline_core/models/catalog.py +260 -0
- openchar_core-1.3.17/src/inline_core/models/character/__init__.py +9 -0
- openchar_core-1.3.17/src/inline_core/models/character/finetune.py +202 -0
- openchar_core-1.3.17/src/inline_core/models/character/runner.py +807 -0
- openchar_core-1.3.17/src/inline_core/models/characterreqs.py +85 -0
- openchar_core-1.3.17/src/inline_core/models/checkpoint.py +129 -0
- openchar_core-1.3.17/src/inline_core/models/controlspace.py +26 -0
- openchar_core-1.3.17/src/inline_core/models/flux2/__init__.py +1 -0
- openchar_core-1.3.17/src/inline_core/models/flux2/controlnet.py +234 -0
- openchar_core-1.3.17/src/inline_core/models/flux2/embeds.py +165 -0
- openchar_core-1.3.17/src/inline_core/models/flux2/provider.py +84 -0
- openchar_core-1.3.17/src/inline_core/models/flux2/requirements.py +449 -0
- openchar_core-1.3.17/src/inline_core/models/flux2/runner.py +760 -0
- openchar_core-1.3.17/src/inline_core/models/flux2/variants.py +398 -0
- openchar_core-1.3.17/src/inline_core/models/keymap.py +319 -0
- openchar_core-1.3.17/src/inline_core/models/krea2/__init__.py +9 -0
- openchar_core-1.3.17/src/inline_core/models/krea2/convert.py +138 -0
- openchar_core-1.3.17/src/inline_core/models/krea2/depth_control.py +149 -0
- openchar_core-1.3.17/src/inline_core/models/krea2/img2img.py +89 -0
- openchar_core-1.3.17/src/inline_core/models/krea2/provider.py +68 -0
- openchar_core-1.3.17/src/inline_core/models/krea2/requirements.py +254 -0
- openchar_core-1.3.17/src/inline_core/models/krea2/runner.py +507 -0
- openchar_core-1.3.17/src/inline_core/models/loaders.py +1444 -0
- openchar_core-1.3.17/src/inline_core/models/lora.py +232 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/__init__.py +18 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/lora_keys.py +73 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/memory.py +201 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/pipeline.py +373 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/provider.py +113 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/requirements.py +462 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/runner.py +400 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/__init__.py +38 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/__init__.py +0 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/allocator_trim_strategy.py +8 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/batch_split.py +105 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/block_streaming/__init__.py +20 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/block_streaming/block_fetcher.py +83 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/block_streaming/builder.py +500 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/block_streaming/disk.py +167 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/block_streaming/pool.py +71 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/block_streaming/provider.py +165 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/block_streaming/source.py +175 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/block_streaming/stream_sync.py +174 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/block_streaming/utils.py +169 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/block_streaming/wrapper.py +101 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/color/__init__.py +59 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/color/audio_mux.py +82 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/color/hlg.py +306 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/color/primaries.py +125 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/color/yuv.py +228 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/components/__init__.py +10 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/components/diffusion_steps.py +252 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/components/guiders.py +369 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/components/noisers.py +37 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/components/patchifiers.py +353 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/components/protocols.py +101 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/components/schedulers.py +130 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/conditioning/__init__.py +25 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/conditioning/exceptions.py +4 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/conditioning/item.py +20 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/conditioning/mask_utils.py +244 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/conditioning/types/__init__.py +19 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/conditioning/types/attention_strength_wrapper.py +71 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/conditioning/types/keyframe_cond.py +90 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/conditioning/types/keyframe_slots.py +174 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/conditioning/types/latent_cond.py +43 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/conditioning/types/mask_cond.py +49 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/conditioning/types/noise_mask_cond.py +45 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/conditioning/types/reference_audio_cond.py +65 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/conditioning/types/reference_video_cond.py +108 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/devices.py +112 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/duration_head/__init__.py +11 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/duration_head/duration_head.py +118 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/duration_head/model_configurator.py +35 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/guidance/__init__.py +15 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/guidance/perturbations.py +143 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/hdr.py +172 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/loader/__init__.py +66 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/loader/attention_ops.py +42 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/loader/fuse_loras.py +204 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/loader/helpers.py +95 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/loader/kernels.py +79 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/loader/module_ops.py +14 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/loader/primitives.py +176 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/loader/registry.py +147 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/loader/sd_ops.py +145 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/loader/sft_loader.py +77 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/loader/single_gpu_model_builder.py +294 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/modality_tiling.py +243 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/__init__.py +11 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/audio_vae/__init__.py +29 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/audio_vae/attention.py +71 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/audio_vae/audio_vae.py +509 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/audio_vae/causal_conv_2d.py +110 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/audio_vae/causality_axis.py +10 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/audio_vae/downsample.py +110 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/audio_vae/model_configurator.py +200 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/audio_vae/ops.py +75 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/audio_vae/resnet.py +176 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/audio_vae/upsample.py +106 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/audio_vae/vocoder.py +630 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/common/__init__.py +9 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/common/normalization.py +59 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/disposable.py +42 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/model_protocol.py +44 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/transformer/__init__.py +22 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/transformer/adaln.py +45 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/transformer/attention.py +579 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/transformer/compiling.py +239 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/transformer/cudagraph_capture.py +167 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/transformer/feed_forward.py +15 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/transformer/gelu_approx.py +10 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/transformer/modality.py +77 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/transformer/model.py +604 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/transformer/model_configurator.py +239 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/transformer/ops.py +106 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/transformer/rope.py +224 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/transformer/text_projection.py +38 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/transformer/timestep_embedding.py +143 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/transformer/transformer.py +447 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/transformer/transformer_args.py +411 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/upsampler/__init__.py +10 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/upsampler/blur_downsample.py +53 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/upsampler/model.py +143 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/upsampler/model_configurator.py +31 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/upsampler/pixel_shuffle.py +54 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/upsampler/res_block.py +37 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/upsampler/spatial_rational_resampler.py +47 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/video_vae/__init__.py +54 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/video_vae/attention.py +69 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/video_vae/conv_video_decoder.py +557 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/video_vae/convolution.py +317 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/video_vae/diffusion_tiling.py +759 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/video_vae/diffusion_video_decoder.py +748 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/video_vae/enums.py +20 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/video_vae/memory_efficient_decode.py +683 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/video_vae/model_configurator.py +565 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/video_vae/normalization.py +3 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/video_vae/ops.py +84 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/video_vae/resnet.py +277 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/video_vae/sampling.py +123 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/video_vae/transformer/__init__.py +107 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/video_vae/transformer/apply.py +206 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/video_vae/transformer/attention.py +174 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/video_vae/transformer/blocks.py +83 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/video_vae/transformer/chunked/__init__.py +1 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/video_vae/transformer/chunked/attn.py +420 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/video_vae/transformer/chunked/block.py +70 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/video_vae/transformer/chunked/context.py +88 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/video_vae/transformer/chunked/mlp.py +178 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/video_vae/transformer/combined/__init__.py +1 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/video_vae/transformer/combined/attn.py +123 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/video_vae/transformer/combined/block.py +32 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/video_vae/transformer/combined/context.py +21 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/video_vae/transformer/combined/mlp.py +24 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/video_vae/transformer/compiling.py +95 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/video_vae/transformer/config.py +110 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/video_vae/transformer/det_attn_rope.py +175 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/video_vae/transformer/dsl_kernels/__init__.py +39 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/video_vae/transformer/dsl_kernels/apply_dsl.py +111 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/video_vae/transformer/dsl_kernels/attn.py +88 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/video_vae/transformer/dsl_kernels/block.py +151 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/video_vae/transformer/dsl_kernels/chain.py +79 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/video_vae/transformer/fallback_na/__init__.py +154 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/video_vae/transformer/fallback_na/eager.py +166 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/video_vae/transformer/fallback_na/triton_na.py +181 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/video_vae/transformer/layers.py +86 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/video_vae/transformer/qkv.py +34 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/video_vae/transformer/rope.py +109 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/video_vae/transformer/rope_math.py +61 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/video_vae/transformer/swiglu.py +479 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/model/video_vae/video_vae.py +637 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/multigpu/__init__.py +11 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/multigpu/gemma/__init__.py +6 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/multigpu/gemma/accelerate_wrapper.py +23 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/multigpu/gemma/batch_parallel_wrapper.py +71 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/multigpu/gemma/broadcast_wrapper.py +120 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/multigpu/gemma/loader.py +120 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/multigpu/sharded_sd.py +191 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/multigpu/transformer/__init__.py +13 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/multigpu/transformer/attention.py +270 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/multigpu/transformer/sequence_parallel.py +318 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/multigpu/transformer/tiled_data_parallel.py +99 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/multigpu/vae/__init__.py +5 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/multigpu/vae/distributed_decoder.py +318 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/quantization/__init__.py +17 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/quantization/blockwise/__init__.py +47 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/quantization/blockwise/_impl.py +433 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/quantization/fp8_cast.py +337 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/quantization/fp8_scaled_mm.py +203 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/quantization/nvfp4/__init__.py +64 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/quantization/nvfp4/convert.py +126 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/quantization/nvfp4/fuse.py +50 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/quantization/nvfp4/linear.py +139 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/quantization/nvfp4/prequant.py +207 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/quantization/nvfp4/types.py +13 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/quantization/policy.py +24 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/text_encoders/__init__.py +1 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/text_encoders/gemma/__init__.py +49 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/text_encoders/gemma/embeddings_connector.py +256 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/text_encoders/gemma/embeddings_processor.py +117 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/text_encoders/gemma/encoders/base_encoder.py +262 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/text_encoders/gemma/encoders/encoder_configurator.py +481 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/text_encoders/gemma/encoders/prompts/gemma3_i2v_system_prompt.txt +30 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/text_encoders/gemma/encoders/prompts/gemma3_t2v_system_prompt.txt +40 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/text_encoders/gemma/encoders/prompts/gemma4_i2v_system_prompt.txt +27 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/text_encoders/gemma/encoders/prompts/gemma4_t2v_system_prompt.txt +25 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/text_encoders/gemma/feature_extractor.py +129 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/text_encoders/gemma/gemma_assets.py +396 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/text_encoders/gemma/tokenizer.py +63 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/tiling.py +945 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/tools.py +280 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/types.py +300 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_core/utils.py +62 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_pipelines/__init__.py +74 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_pipelines/a2vid_two_stage.py +387 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_pipelines/dfr_layout.py +213 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_pipelines/dfr_pipeline.py +630 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_pipelines/distilled.py +367 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_pipelines/distilled_mgpu.py +233 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_pipelines/dubit.py +401 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_pipelines/hdr_ic_lora.py +987 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_pipelines/ic_lora.py +540 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_pipelines/iclora_utils.py +170 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_pipelines/keyframe_interpolation.py +362 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_pipelines/multigpu/__init__.py +31 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_pipelines/multigpu/_broadcast.py +68 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_pipelines/multigpu/bp_gemma_builder.py +90 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_pipelines/multigpu/controller.py +382 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_pipelines/multigpu/delegating_builder.py +91 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_pipelines/multigpu/fleet.py +375 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_pipelines/multigpu/gemma_builders.py +199 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_pipelines/multigpu/nccl_groups.py +31 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_pipelines/multigpu/runner.py +62 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_pipelines/multigpu/sp_builder.py +62 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_pipelines/multigpu/tdp_builder.py +75 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_pipelines/multigpu/vae_builders.py +87 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_pipelines/multigpu/weight_tracker.py +181 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_pipelines/retake.py +397 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_pipelines/t2a_one_stage.py +215 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_pipelines/ti2vid_one_stage.py +311 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_pipelines/ti2vid_two_stages.py +380 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_pipelines/ti2vid_two_stages_hq.py +409 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_pipelines/ti2vid_two_stages_hq_mgpu.py +278 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_pipelines/ti2vid_two_stages_mgpu.py +279 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_pipelines/utils/__init__.py +57 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_pipelines/utils/args.py +1214 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_pipelines/utils/blocks.py +1236 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_pipelines/utils/constants.py +199 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_pipelines/utils/denoisers.py +361 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_pipelines/utils/gpu_model.py +34 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_pipelines/utils/helpers.py +585 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_pipelines/utils/media_io/__init__.py +76 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_pipelines/utils/media_io/color_config.py +103 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_pipelines/utils/media_io/decode.py +435 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_pipelines/utils/media_io/encode.py +302 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_pipelines/utils/media_io/exr.py +255 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_pipelines/utils/media_io/range_map.py +25 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_pipelines/utils/media_io/resize.py +143 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_pipelines/utils/model_paths.py +189 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_pipelines/utils/quantization_factory.py +50 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_pipelines/utils/res2s.py +62 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_pipelines/utils/samplers.py +707 -0
- openchar_core-1.3.17/src/inline_core/models/ltx25/vendor/ltx_pipelines/utils/types.py +144 -0
- openchar_core-1.3.17/src/inline_core/models/minimaxh3/__init__.py +7 -0
- openchar_core-1.3.17/src/inline_core/models/minimaxh3/adaln.py +248 -0
- openchar_core-1.3.17/src/inline_core/models/minimaxh3/keys.py +158 -0
- openchar_core-1.3.17/src/inline_core/models/minimaxh3/load.py +448 -0
- openchar_core-1.3.17/src/inline_core/models/minimaxh3/lora_keys.py +235 -0
- openchar_core-1.3.17/src/inline_core/models/minimaxh3/nvfp4.py +201 -0
- openchar_core-1.3.17/src/inline_core/models/minimaxh3/pipeline.py +1083 -0
- openchar_core-1.3.17/src/inline_core/models/minimaxh3/provider.py +102 -0
- openchar_core-1.3.17/src/inline_core/models/minimaxh3/requirements.py +450 -0
- openchar_core-1.3.17/src/inline_core/models/minimaxh3/runner.py +622 -0
- openchar_core-1.3.17/src/inline_core/models/minimaxh3/vae_keys.py +125 -0
- openchar_core-1.3.17/src/inline_core/models/minimaxh3/vendor/__init__.py +46 -0
- openchar_core-1.3.17/src/inline_core/models/minimaxh3/vendor/autoencoder_kl_minimax_h3.py +922 -0
- openchar_core-1.3.17/src/inline_core/models/minimaxh3/vendor/autoencoder_kl_minimax_h3_audio.py +679 -0
- openchar_core-1.3.17/src/inline_core/models/minimaxh3/vendor/before_denoise.py +425 -0
- openchar_core-1.3.17/src/inline_core/models/minimaxh3/vendor/before_encoder.py +408 -0
- openchar_core-1.3.17/src/inline_core/models/minimaxh3/vendor/decoders.py +199 -0
- openchar_core-1.3.17/src/inline_core/models/minimaxh3/vendor/denoise.py +325 -0
- openchar_core-1.3.17/src/inline_core/models/minimaxh3/vendor/encoders.py +639 -0
- openchar_core-1.3.17/src/inline_core/models/minimaxh3/vendor/modular_blocks_minimax_h3.py +345 -0
- openchar_core-1.3.17/src/inline_core/models/minimaxh3/vendor/modular_pipeline.py +115 -0
- openchar_core-1.3.17/src/inline_core/models/minimaxh3/vendor/packing.py +538 -0
- openchar_core-1.3.17/src/inline_core/models/minimaxh3/vendor/packing_ref2va.py +841 -0
- openchar_core-1.3.17/src/inline_core/models/minimaxh3/vendor/scheduling_minimax_h3.py +288 -0
- openchar_core-1.3.17/src/inline_core/models/minimaxh3/vendor/transformer_minimax_h3.py +644 -0
- openchar_core-1.3.17/src/inline_core/models/offload.py +285 -0
- openchar_core-1.3.17/src/inline_core/models/pipeline_runtime.py +832 -0
- openchar_core-1.3.17/src/inline_core/models/prepared.py +151 -0
- openchar_core-1.3.17/src/inline_core/models/preprocess/__init__.py +5 -0
- openchar_core-1.3.17/src/inline_core/models/preprocess/requirements.py +59 -0
- openchar_core-1.3.17/src/inline_core/models/preprocess/runner.py +174 -0
- openchar_core-1.3.17/src/inline_core/models/references.py +125 -0
- openchar_core-1.3.17/src/inline_core/models/registry_index.py +301 -0
- openchar_core-1.3.17/src/inline_core/models/requirements.py +145 -0
- openchar_core-1.3.17/src/inline_core/models/sampling.py +174 -0
- openchar_core-1.3.17/src/inline_core/models/training/__init__.py +3 -0
- openchar_core-1.3.17/src/inline_core/models/training/runner.py +239 -0
- openchar_core-1.3.17/src/inline_core/models/trainingreqs.py +109 -0
- openchar_core-1.3.17/src/inline_core/models/video_params.py +147 -0
- openchar_core-1.3.17/src/inline_core/models/zimage/__init__.py +11 -0
- openchar_core-1.3.17/src/inline_core/models/zimage/primitives.py +578 -0
- openchar_core-1.3.17/src/inline_core/models/zimage/provider.py +73 -0
- openchar_core-1.3.17/src/inline_core/models/zimage/requirements.py +348 -0
- openchar_core-1.3.17/src/inline_core/models/zimage/runner.py +529 -0
- openchar_core-1.3.17/src/inline_core/parallel/__init__.py +13 -0
- openchar_core-1.3.17/src/inline_core/parallel/config.py +50 -0
- openchar_core-1.3.17/src/inline_core/parallel/group.py +136 -0
- openchar_core-1.3.17/src/inline_core/parallel/launch.py +44 -0
- openchar_core-1.3.17/src/inline_core/parallel/protocol.py +53 -0
- openchar_core-1.3.17/src/inline_core/parallel/registry.py +31 -0
- openchar_core-1.3.17/src/inline_core/parallel/worker.py +75 -0
- openchar_core-1.3.17/src/inline_core/runtime/__init__.py +1 -0
- openchar_core-1.3.17/src/inline_core/runtime/context.py +38 -0
- openchar_core-1.3.17/src/inline_core/runtime/file_store.py +81 -0
- openchar_core-1.3.17/src/inline_core/runtime/progress.py +93 -0
- openchar_core-1.3.17/src/inline_core/runtime/run.py +116 -0
- openchar_core-1.3.17/src/inline_core/runtime/store.py +45 -0
- openchar_core-1.3.17/src/inline_core/runtime/video_encode.py +211 -0
- openchar_core-1.3.17/src/inline_core/sampling/__init__.py +1 -0
- openchar_core-1.3.17/src/inline_core/sampling/batch.py +116 -0
- openchar_core-1.3.17/src/inline_core/server/__init__.py +1 -0
- openchar_core-1.3.17/src/inline_core/server/__main__.py +118 -0
- openchar_core-1.3.17/src/inline_core/server/app.py +689 -0
- openchar_core-1.3.17/src/inline_core/server/assets.py +47 -0
- openchar_core-1.3.17/src/inline_core/server/bootstrap.py +160 -0
- openchar_core-1.3.17/src/inline_core/server/frontend.py +37 -0
- openchar_core-1.3.17/src/inline_core/server/manager.py +276 -0
- openchar_core-1.3.17/src/inline_core/server/rpc.py +75 -0
- openchar_core-1.3.17/src/inline_core/server/run_store.py +155 -0
- openchar_core-1.3.17/src/inline_core/server/serialize.py +223 -0
- openchar_core-1.3.17/src/inline_core/server/version.py +205 -0
- openchar_core-1.3.17/src/inline_core/studio/__init__.py +7 -0
- openchar_core-1.3.17/src/inline_core/studio/activity.py +396 -0
- openchar_core-1.3.17/src/inline_core/studio/assets.py +194 -0
- openchar_core-1.3.17/src/inline_core/studio/characters.py +474 -0
- openchar_core-1.3.17/src/inline_core/studio/config.py +28 -0
- openchar_core-1.3.17/src/inline_core/studio/dataset_import.py +236 -0
- openchar_core-1.3.17/src/inline_core/studio/fal.py +564 -0
- openchar_core-1.3.17/src/inline_core/studio/finetune.py +632 -0
- openchar_core-1.3.17/src/inline_core/studio/frames.py +565 -0
- openchar_core-1.3.17/src/inline_core/studio/generation.py +342 -0
- openchar_core-1.3.17/src/inline_core/studio/graph_build.py +402 -0
- openchar_core-1.3.17/src/inline_core/studio/handlers.py +420 -0
- openchar_core-1.3.17/src/inline_core/studio/image_meta.py +36 -0
- openchar_core-1.3.17/src/inline_core/studio/models.py +494 -0
- openchar_core-1.3.17/src/inline_core/studio/moodboard.py +576 -0
- openchar_core-1.3.17/src/inline_core/studio/peaks.py +170 -0
- openchar_core-1.3.17/src/inline_core/studio/recipe.py +282 -0
- openchar_core-1.3.17/src/inline_core/studio/schema.py +436 -0
- openchar_core-1.3.17/src/inline_core/studio/store.py +445 -0
- openchar_core-1.3.17/src/inline_core/studio/system_stats.py +92 -0
- openchar_core-1.3.17/src/inline_core/studio/timeline/__init__.py +6 -0
- openchar_core-1.3.17/src/inline_core/studio/timeline/compose.py +130 -0
- openchar_core-1.3.17/src/inline_core/studio/timeline/ffmpeg.py +76 -0
- openchar_core-1.3.17/src/inline_core/studio/timeline/render.py +120 -0
- openchar_core-1.3.17/src/inline_core/studio/timeline/resolve.py +197 -0
- openchar_core-1.3.17/src/inline_core/studio/training.py +934 -0
- openchar_core-1.3.17/src/inline_core/studio/training_store.py +358 -0
- openchar_core-1.3.17/src/inline_core/studio/tuning_report.py +225 -0
- openchar_core-1.3.17/src/inline_core/studio/workflows.py +193 -0
- openchar_core-1.3.17/src/inline_core/takes.py +31 -0
- openchar_core-1.3.17/src/inline_core/training/__init__.py +10 -0
- openchar_core-1.3.17/src/inline_core/training/__main__.py +74 -0
- openchar_core-1.3.17/src/inline_core/training/arch.py +518 -0
- openchar_core-1.3.17/src/inline_core/training/cache.py +116 -0
- openchar_core-1.3.17/src/inline_core/training/caption.py +177 -0
- openchar_core-1.3.17/src/inline_core/training/dataset.py +312 -0
- openchar_core-1.3.17/src/inline_core/training/h3.py +529 -0
- openchar_core-1.3.17/src/inline_core/training/ltx25.py +364 -0
- openchar_core-1.3.17/src/inline_core/training/models.py +618 -0
- openchar_core-1.3.17/src/inline_core/training/precache_store.py +138 -0
- openchar_core-1.3.17/src/inline_core/training/protocol.py +61 -0
- openchar_core-1.3.17/src/inline_core/training/trainer.py +395 -0
- openchar_core-1.3.17/tests/conftest.py +25 -0
- openchar_core-1.3.17/tests/helpers.py +80 -0
- openchar_core-1.3.17/tests/reference/lookalike_faces.json +91 -0
- openchar_core-1.3.17/tests/test_cache.py +116 -0
- openchar_core-1.3.17/tests/test_catalog.py +205 -0
- openchar_core-1.3.17/tests/test_character_nodes.py +893 -0
- openchar_core-1.3.17/tests/test_character_requirements.py +131 -0
- openchar_core-1.3.17/tests/test_characters_apply.py +249 -0
- openchar_core-1.3.17/tests/test_characters_encode.py +507 -0
- openchar_core-1.3.17/tests/test_characters_library.py +105 -0
- openchar_core-1.3.17/tests/test_characters_rpc.py +387 -0
- openchar_core-1.3.17/tests/test_characters_scoring.py +560 -0
- openchar_core-1.3.17/tests/test_characters_wiring.py +269 -0
- openchar_core-1.3.17/tests/test_charfile.py +161 -0
- openchar_core-1.3.17/tests/test_checkpoint.py +143 -0
- openchar_core-1.3.17/tests/test_clip_grid_parity.py +68 -0
- openchar_core-1.3.17/tests/test_config.py +27 -0
- openchar_core-1.3.17/tests/test_dataset_import.py +128 -0
- openchar_core-1.3.17/tests/test_device_detect.py +323 -0
- openchar_core-1.3.17/tests/test_encoder_parking.py +94 -0
- openchar_core-1.3.17/tests/test_executor.py +74 -0
- openchar_core-1.3.17/tests/test_extension_api.py +210 -0
- openchar_core-1.3.17/tests/test_extension_install.py +572 -0
- openchar_core-1.3.17/tests/test_extension_manifest.py +184 -0
- openchar_core-1.3.17/tests/test_extension_resolve.py +298 -0
- openchar_core-1.3.17/tests/test_extension_scanner.py +291 -0
- openchar_core-1.3.17/tests/test_extension_spine.py +98 -0
- openchar_core-1.3.17/tests/test_extension_state.py +114 -0
- openchar_core-1.3.17/tests/test_file_store.py +33 -0
- openchar_core-1.3.17/tests/test_finetune_node.py +137 -0
- openchar_core-1.3.17/tests/test_finetune_service.py +311 -0
- openchar_core-1.3.17/tests/test_flux2_controlnet.py +159 -0
- openchar_core-1.3.17/tests/test_flux2_folder.py +179 -0
- openchar_core-1.3.17/tests/test_flux2_resolve.py +176 -0
- openchar_core-1.3.17/tests/test_flux2_runner.py +148 -0
- openchar_core-1.3.17/tests/test_flux2_training.py +199 -0
- openchar_core-1.3.17/tests/test_flux2_variants.py +197 -0
- openchar_core-1.3.17/tests/test_frontend_serving.py +139 -0
- openchar_core-1.3.17/tests/test_h3_characters.py +609 -0
- openchar_core-1.3.17/tests/test_hidden_nodes.py +44 -0
- openchar_core-1.3.17/tests/test_keymap.py +268 -0
- openchar_core-1.3.17/tests/test_krea2_convert.py +157 -0
- openchar_core-1.3.17/tests/test_krea2_depth_control.py +104 -0
- openchar_core-1.3.17/tests/test_krea2_requirements.py +148 -0
- openchar_core-1.3.17/tests/test_krea2_runner.py +165 -0
- openchar_core-1.3.17/tests/test_loader_runners.py +83 -0
- openchar_core-1.3.17/tests/test_loaders.py +131 -0
- openchar_core-1.3.17/tests/test_lora.py +261 -0
- openchar_core-1.3.17/tests/test_lora_download.py +75 -0
- openchar_core-1.3.17/tests/test_ltx25_lora_keys.py +117 -0
- openchar_core-1.3.17/tests/test_ltx25_nodes.py +201 -0
- openchar_core-1.3.17/tests/test_ltx25_requirements.py +438 -0
- openchar_core-1.3.17/tests/test_ltx25_training.py +220 -0
- openchar_core-1.3.17/tests/test_ltx25_wired_refs.py +55 -0
- openchar_core-1.3.17/tests/test_manager_queue.py +152 -0
- openchar_core-1.3.17/tests/test_memory_policy.py +283 -0
- openchar_core-1.3.17/tests/test_minimaxh3_adaln.py +166 -0
- openchar_core-1.3.17/tests/test_minimaxh3_keys.py +138 -0
- openchar_core-1.3.17/tests/test_minimaxh3_load.py +405 -0
- openchar_core-1.3.17/tests/test_minimaxh3_lora_keys.py +249 -0
- openchar_core-1.3.17/tests/test_minimaxh3_nodes.py +723 -0
- openchar_core-1.3.17/tests/test_minimaxh3_nvfp4.py +220 -0
- openchar_core-1.3.17/tests/test_minimaxh3_training.py +489 -0
- openchar_core-1.3.17/tests/test_model_download_queue.py +205 -0
- openchar_core-1.3.17/tests/test_model_registry_index.py +163 -0
- openchar_core-1.3.17/tests/test_model_requirements.py +172 -0
- openchar_core-1.3.17/tests/test_offload_prepared.py +233 -0
- openchar_core-1.3.17/tests/test_output_kind_contract.py +67 -0
- openchar_core-1.3.17/tests/test_parallel_group.py +51 -0
- openchar_core-1.3.17/tests/test_pipeline_cache.py +82 -0
- openchar_core-1.3.17/tests/test_precache_store.py +113 -0
- openchar_core-1.3.17/tests/test_primitives.py +97 -0
- openchar_core-1.3.17/tests/test_recipe.py +473 -0
- openchar_core-1.3.17/tests/test_references.py +84 -0
- openchar_core-1.3.17/tests/test_rpc_bridge.py +51 -0
- openchar_core-1.3.17/tests/test_run_store.py +67 -0
- openchar_core-1.3.17/tests/test_sampling.py +121 -0
- openchar_core-1.3.17/tests/test_schema.py +52 -0
- openchar_core-1.3.17/tests/test_server.py +122 -0
- openchar_core-1.3.17/tests/test_staged_residency.py +256 -0
- openchar_core-1.3.17/tests/test_studio_activity.py +270 -0
- openchar_core-1.3.17/tests/test_studio_assets.py +72 -0
- openchar_core-1.3.17/tests/test_studio_fal.py +343 -0
- openchar_core-1.3.17/tests/test_studio_frames.py +126 -0
- openchar_core-1.3.17/tests/test_studio_generation.py +316 -0
- openchar_core-1.3.17/tests/test_studio_graph_build.py +161 -0
- openchar_core-1.3.17/tests/test_studio_models.py +110 -0
- openchar_core-1.3.17/tests/test_studio_moodboard.py +138 -0
- openchar_core-1.3.17/tests/test_studio_multi_reference.py +195 -0
- openchar_core-1.3.17/tests/test_studio_node_size.py +58 -0
- openchar_core-1.3.17/tests/test_studio_peaks.py +143 -0
- openchar_core-1.3.17/tests/test_studio_rpc.py +149 -0
- openchar_core-1.3.17/tests/test_studio_schema.py +269 -0
- openchar_core-1.3.17/tests/test_studio_store.py +174 -0
- openchar_core-1.3.17/tests/test_studio_timeline.py +119 -0
- openchar_core-1.3.17/tests/test_studio_training.py +377 -0
- openchar_core-1.3.17/tests/test_sweep.py +191 -0
- openchar_core-1.3.17/tests/test_take_bytes.py +56 -0
- openchar_core-1.3.17/tests/test_topo.py +30 -0
- openchar_core-1.3.17/tests/test_training_arch.py +113 -0
- openchar_core-1.3.17/tests/test_training_dataset.py +141 -0
- openchar_core-1.3.17/tests/test_training_models.py +225 -0
- openchar_core-1.3.17/tests/test_training_nodes.py +290 -0
- openchar_core-1.3.17/tests/test_training_requirements.py +136 -0
- openchar_core-1.3.17/tests/test_training_resolve.py +90 -0
- openchar_core-1.3.17/tests/test_training_snapshots.py +68 -0
- openchar_core-1.3.17/tests/test_validate.py +63 -0
- openchar_core-1.3.17/tests/test_version_report.py +79 -0
- openchar_core-1.3.17/tests/test_video_encode.py +181 -0
- openchar_core-1.3.17/tests/test_video_params.py +114 -0
- openchar_core-1.3.17/tests/test_webui_install.py +376 -0
- openchar_core-1.3.17/tests/test_workflows_proxy.py +105 -0
- openchar_core-1.3.17/tests/test_xfuser_sampler.py +88 -0
- openchar_core-1.3.17/tests/test_zimage_primitives.py +321 -0
- openchar_core-1.3.17/tests/test_zimage_resolve.py +158 -0
- openchar_core-1.3.17/tests/test_zimage_runner.py +580 -0
- openchar_core-1.3.17/uv.lock +2777 -0
- openchar_core-1.3.17/webui.bat +506 -0
- openchar_core-1.3.17/webui.sh +535 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Model weights (gigabytes). The engine's models root - `models_dir()` defaults to ./models, and
|
|
2
|
+
# runners scan ./models/<category>/ (e.g. diffusion_models/). Leading slash anchors this to the repo
|
|
3
|
+
# root ONLY, so the source package src/inline_core/models/ (code) stays tracked.
|
|
4
|
+
/models/
|
|
5
|
+
|
|
6
|
+
# Engine working data: the run DB and generated takes (also grows to gigabytes).
|
|
7
|
+
/.inline/
|
|
8
|
+
|
|
9
|
+
# Installed community extensions - `extensions_dir()` defaults to ./extensions (state.json, the
|
|
10
|
+
# per-extension source/venv, and the .cache/git mirrors). Runtime data, never committed.
|
|
11
|
+
/extensions/
|
|
12
|
+
|
|
13
|
+
# Studio app data + project workspace (when created under the repo) and local server logs.
|
|
14
|
+
/.inline-studio-server/
|
|
15
|
+
/InlineStudioProjects/
|
|
16
|
+
*.log
|
|
17
|
+
|
|
18
|
+
# Python venv + bytecode
|
|
19
|
+
.venv/
|
|
20
|
+
__pycache__/
|
|
21
|
+
*.py[cod]
|
|
22
|
+
|
|
23
|
+
# Local env overrides
|
|
24
|
+
.env
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.11
|
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
# Inline Core - Engineering Guide
|
|
2
|
+
|
|
3
|
+
Inline Core is the **generation engine behind Inline** (the Storyline / Inline Studio UI client). It
|
|
4
|
+
takes a **typed node graph (JSON)** and returns immutable renders ("takes"), running image and video
|
|
5
|
+
models across macOS, Windows, and Linux - from CPU-only boxes and low-VRAM laptops up to multi-GPU
|
|
6
|
+
machines that split a single image's sampling across GPUs (via xDiT). **It is the render backend that
|
|
7
|
+
replaces ComfyUI for Inline.**
|
|
8
|
+
|
|
9
|
+
> The UI client lives in the separate **Inline Studio** repo
|
|
10
|
+
> ([`inlineresearch/Inline-Studio`](https://github.com/inlineresearch/Inline-Studio)), which vendors
|
|
11
|
+
> this engine under `core/` via `git subtree`. It drives the engine over the `/v1` HTTP + websocket
|
|
12
|
+
> API; Inline Core is headless and knows nothing about the UI.
|
|
13
|
+
|
|
14
|
+
> **GitHub org: `inlineresearch`** - never `inline-studio/` or any other org in a URL, manifest, or
|
|
15
|
+
> doc. Sibling repos: `Inline-Studio` (UI + this engine), `Inline-Registry` (the published extension
|
|
16
|
+
> index served to the Available tab), `Inline-Studio-Extension-Guide` (the reference extension).
|
|
17
|
+
|
|
18
|
+
> Read this file before changing code. It defines the architecture and the non-negotiable rules.
|
|
19
|
+
> `README.md` is the user/product-facing version of the same story; this is the engineering contract.
|
|
20
|
+
|
|
21
|
+
## Mental model (everything is organised around this)
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
Graph (typed nodes + edges) → Run → Take[] (immutable renders)
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
- **Graph** - a JSON DAG of typed nodes. Edges are type-checked (`model`, `vae`, `conditioning`,
|
|
28
|
+
`latent`, media) **before** the run, so a bad graph is rejected at submit (422), never mid-denoise.
|
|
29
|
+
- **Run** - one execution of a target node's upstream closure. Durable (survives a restart) and
|
|
30
|
+
pollable; progress streams over a websocket.
|
|
31
|
+
- **Take** - one immutable output. Regenerating adds a take; **nothing is overwritten** (this mirrors
|
|
32
|
+
Inline Studio's frame/take model - the take history is the core value Comfy lacks).
|
|
33
|
+
- **Node** - has a **descriptor** (the data half: ports, params, file pickers - served at
|
|
34
|
+
`/v1/models`) and a **runner** (the behavior half). A descriptor with no runner is served and
|
|
35
|
+
type-checked but cannot execute yet.
|
|
36
|
+
|
|
37
|
+
### The two boundaries that matter most (why this isn't ComfyUI)
|
|
38
|
+
|
|
39
|
+
1. **Graph orchestration is decoupled from GPU work.** The executor runs cheap orchestration inline
|
|
40
|
+
and never runs the denoise loop itself - a model runner submits a `SampleJob` through the
|
|
41
|
+
**batched-sampler seam** (`sampling/batch.py`). The graph is the unit of caching; the sampler is
|
|
42
|
+
the unit of batching; the multi-GPU split routes through that same seam.
|
|
43
|
+
2. **The device policy is the single owner of placement.** No node or component ever picks a device,
|
|
44
|
+
dtype, or offload. They ask `DevicePolicy.placement(role)`. So the same graph runs on a 4090, a
|
|
45
|
+
6 GB laptop, pure CPU, or split across several GPUs, without touching the graph.
|
|
46
|
+
|
|
47
|
+
If you find yourself hardcoding a device in a component, or running a denoise loop inside the
|
|
48
|
+
executor, stop - you're breaking one of the two boundaries the whole design exists to keep.
|
|
49
|
+
|
|
50
|
+
## Architecture
|
|
51
|
+
|
|
52
|
+
Headless Python. A FastAPI `/v1` server over a run manager, a node registry, and a device policy.
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
HTTP/WS → server/app.py → RunManager → Executor → Registry (descriptor + runner)
|
|
56
|
+
│
|
|
57
|
+
runner "lowers" to → components (TextEncoder/Denoiser/VAE/…)
|
|
58
|
+
│
|
|
59
|
+
SampleJob → BatchedSampler (inline | xDiT worker group)
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
- **`server/`** - the `/v1` API. `app.py` (routes), `manager.py` (validate → queue → run on a worker
|
|
63
|
+
thread → fan out events), `run_store.py` (SQLite durability), `bootstrap.py` (best-effort model
|
|
64
|
+
registration), `serialize.py` (contract JSON), `assets.py` (content-addressed upload).
|
|
65
|
+
- **`graph/`** - the engine core. `schema.py` (typed `Graph`/`Node`/`Edge` + JSON parser),
|
|
66
|
+
`descriptor.py` (node data half), `runners.py` (node behavior half + source nodes), `registry.py`
|
|
67
|
+
(descriptors + runners), `validate.py` + `topo.py` (type-check + order), `executor.py` (lazy
|
|
68
|
+
closure execution, node cache), `primitives.py` (the low-level node vocabulary), `cache.py`.
|
|
69
|
+
- **`components/`** - the five device-agnostic component interfaces (`TextEncoder`, `Scheduler`,
|
|
70
|
+
`Denoiser`, `Sampler`, `VAE`) plus opaque `Conditioning`/`Latents`. Placement comes from the ctx.
|
|
71
|
+
- **`sampling/`** - `batch.py`: the graph/GPU boundary. `SampleJob` → `BatchedSampler`
|
|
72
|
+
(`InlineBatchedSampler` today; `XFuserBatchedSampler` routes a parallel placement to the worker
|
|
73
|
+
group). Keep this module torch-free and mockable.
|
|
74
|
+
- **`device/`** - the policy. `policy.py` (interface: `Placement`, `Profile`, quant, attention),
|
|
75
|
+
`memory.py` (`MemoryPolicy`), `detect.py` / `auto.py` (enumerate GPUs, NVLink vs PCIe), `types.py`.
|
|
76
|
+
- **`parallel/`** - the xDiT (xfuser) worker group: one process per GPU via `torchrun`, talking over
|
|
77
|
+
local IPC behind the sampler seam. `launch.py`, `worker.py`, `group.py`, `registry.py`, `config.py`,
|
|
78
|
+
`protocol.py`. The HTTP server, DB, and graph stay single-process; only the denoise distributes.
|
|
79
|
+
- **`models/`** - `catalog.py` (scans the models root, feeds `options_from` selects + the registry
|
|
80
|
+
version) and the **model-runner subpackages** (e.g. `zimage/`), imported best-effort by
|
|
81
|
+
`server/bootstrap.py` so a torch-less install still boots.
|
|
82
|
+
- **`runtime/`** - `context.py` (`ExecutionContext`, `CancelToken`), `run.py` (`RunState`),
|
|
83
|
+
`progress.py` (events + emitters), `store.py` / `file_store.py` (`TakeStore`: owns take bytes/hash/
|
|
84
|
+
uri).
|
|
85
|
+
- **`config.py`** - all env config, small and explicit. **`takes.py`**, **`media.py`**, **`errors.py`**
|
|
86
|
+
- domain primitives (`Take`/`AssetRef`, `MediaKind`, the error hierarchy).
|
|
87
|
+
|
|
88
|
+
### Node vocabularies (three, and their status)
|
|
89
|
+
|
|
90
|
+
- **Source nodes** (`graph/runners.py`) - `input/text`, `input/image`. Runners exist; pure, no takes.
|
|
91
|
+
These are the closure boundary: the UI feeds curated inputs in as source nodes so nothing upstream
|
|
92
|
+
is recomputed.
|
|
93
|
+
- **Low-level primitives** (`graph/primitives.py`) - `load/diffusion-model`, `load/vae`,
|
|
94
|
+
`load/text-encoder`, `encode/text`, `latent/empty`, `sample`, `vae/decode`, `vae/encode`. These are
|
|
95
|
+
the ComfyUI-equivalent decomposed graph and the intended long-term surface. **Descriptor-only
|
|
96
|
+
today - their runners land in C2.** A graph built from them validates and type-checks but raises
|
|
97
|
+
`No runner registered` at execution.
|
|
98
|
+
- **Model runners** (`models/<name>/`) - high-level single generation nodes. **`black-forest-labs/flux-2`
|
|
99
|
+
(`models/flux2/`) is the reference for a _family_:** one node covers klein 4B/9B, their base builds,
|
|
100
|
+
the KV variant and dev, because the picked checkpoint is identified from its own tensor shapes
|
|
101
|
+
(`flux2/variants.py`) and everything else follows. Adding a checkpoint is a row in that table.
|
|
102
|
+
Two rules it establishes: **identify a checkpoint by content, never by filename** (`diffusion_models/`
|
|
103
|
+
is shared across architectures, and Qwen3-4B and Qwen3-VL-4B have byte-identical embedding shapes),
|
|
104
|
+
and **derive geometry from the checkpoint** rather than bundling a config per variant, so a future
|
|
105
|
+
build loads with no code change. A **diffusers folder** is a valid checkpoint too, which is the only
|
|
106
|
+
way a 32B model reaches a 24 GB card: its NF4 shards stream through `from_pretrained`, where
|
|
107
|
+
`from_single_file` cannot quantize at all. **`alibaba/z-image-turbo`
|
|
108
|
+
(`models/zimage/`) is the one runnable generation path today** (prompt + optional image → one take,
|
|
109
|
+
backed by diffusers' `ZImagePipeline`/`ZImageImg2ImgPipeline`). This is the "Z-Image pipeline that
|
|
110
|
+
already works" - the primitives will reach parity in C2. It loads from a **single diffusion
|
|
111
|
+
`.safetensors`** (drop one file in `diffusion_models/`, ComfyUI-style - no repo folder to set up):
|
|
112
|
+
the runner loads the transformer via `from_single_file` and pulls the VAE / text-encoder / tokenizer
|
|
113
|
+
from the reference repo behind the scenes, so the user only ever handles one model file.
|
|
114
|
+
- **Low-level primitives and source nodes are `hidden`** (`NodeDescriptor.hidden`): they are served for
|
|
115
|
+
validation/execution but never offered in the UI's add-node menu. Generation stays one-click - the
|
|
116
|
+
user sees only high-level model nodes; loaders/VAE/encoders are wired up behind them.
|
|
117
|
+
|
|
118
|
+
Only media-output nodes (`vae/decode`, a model runner) become Frames with take history; the engine
|
|
119
|
+
handles (`model`, `vae`, `text-encoder`, `conditioning`, `latent`) are opaque typed sockets passed
|
|
120
|
+
between nodes and are never takes.
|
|
121
|
+
|
|
122
|
+
### Storage & configuration (all env, see `config.py`)
|
|
123
|
+
|
|
124
|
+
- **Never put weights on an instance's ephemeral/scratch disk.** On cloud GPU boxes (`/opt/dlami/nvme`,
|
|
125
|
+
`/mnt/resource`, and anything else labelled ephemeral or instance-store) the volume is **wiped on
|
|
126
|
+
every stop/start**, taking the models and leaving dangling symlinks in `models/`. This has cost two
|
|
127
|
+
full re-downloads of MiniMax H3 at ~130 GB each. Weights go on the persistent root volume, or on an
|
|
128
|
+
attached volume that survives a restart. Scratch is fine for logs and temporary output only.
|
|
129
|
+
- **`huggingface_hub>=0.32`** - below it `hf_xet` is only an extra, and files over ~50GB (every
|
|
130
|
+
H3 transformer) refuse to download at all.
|
|
131
|
+
- **Models root** - `INLINE_MODELS_DIR`, else `./models`. **Bring your own weights; nothing is
|
|
132
|
+
downloaded.** ComfyUI-style category subfolders (`diffusion_models/`, `vae/`, `text_encoders/`,
|
|
133
|
+
`loras/`, `controlnet/`, `checkpoints/`, `clip_vision/`, `upscale_models/`, `embeddings/`). The
|
|
134
|
+
catalog scans this on start; a file dropped in bumps the registry version so clients refetch
|
|
135
|
+
`/v1/models`. A model may be a single weight file or a folder (e.g. a diffusers snapshot or a
|
|
136
|
+
sharded text encoder).
|
|
137
|
+
- **Data dir** - `INLINE_DATA_DIR`, else `./.inline`. Engine-owned working data: `runs.db` (durable
|
|
138
|
+
runs) and `takes/` (output bytes).
|
|
139
|
+
- **Server bind** - `INLINE_HOST` (default `127.0.0.1`), `INLINE_PORT` (default `8848`).
|
|
140
|
+
- **Model overrides** - e.g. `INLINE_ZIMAGE_MODEL` (a single `.safetensors` file path, a local
|
|
141
|
+
diffusers dir, or a HF repo id for Z-Image). Auto-resolved from `diffusion_models/` when unset.
|
|
142
|
+
- **Memory** - by default prefer the GPU, and **auto-fit the model to it**. When a runner hands the
|
|
143
|
+
policy the model's on-disk sizes (`DevicePolicy.set_footprint`, a `ModelFootprint`), the policy sizes
|
|
144
|
+
the weights against total VRAM (minus an activation headroom) and picks the lightest plan that fits:
|
|
145
|
+
full-precision **resident** → else int8 **resident** (torchao halves the transformer + text encoder,
|
|
146
|
+
no CPU offload - int8 + accelerate's `enable_model_cpu_offload` deadlock together) → else unquantized
|
|
147
|
+
`SEQUENTIAL` submodule streaming. So a card that can't hold Z-Image full-precision (a T4)
|
|
148
|
+
**auto-int8s with no flag**; `set_footprint(None)` / an unsizable whole-pipeline folder falls back to
|
|
149
|
+
the coarse total-VRAM buckets. Capacity is TOTAL VRAM (a fixed device property), not live-free, so the
|
|
150
|
+
plan - and the pipeline cache key it feeds - is stable across runs. The runner does a **pre-flight
|
|
151
|
+
check** (`DevicePolicy.fit_estimate`): a model too big for VRAM+RAM fails with a clean node error
|
|
152
|
+
before any load, instead of a host-RAM OOM-kill that would take the shared server down. Weights stream
|
|
153
|
+
straight to the GPU on load (`device=`/`device_map` in `models/loaders.py`) so peak host RAM ≈ one
|
|
154
|
+
tensor, and switching checkpoints **evicts** the previous model (`loaders.unload_components`,
|
|
155
|
+
`_evict_stale`) rather than stacking. `webui.sh` always sets `PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True`
|
|
156
|
+
to cut fragmentation OOMs. **Smart memory** (`INLINE_SMART_MEMORY=1`, `--smart-memory`) and
|
|
157
|
+
`INLINE_ALLOW_CPU_OFFLOAD=1` remain as explicit overrides when no footprint is set.
|
|
158
|
+
- **Compute dtype** - bf16 on the GPU by default, but **fp16 on cards without bf16 acceleration**
|
|
159
|
+
(Turing/Volta - compute capability < 8.0, e.g. a T4): same footprint, but it uses the fp16 tensor
|
|
160
|
+
cores instead of bf16's slow path. The **VAE stays upcast** (bf16, or fp32 when the denoiser is
|
|
161
|
+
fp16) because fp16 VAE decode can overflow to black/NaN images (`_compute_dtype` in `device/`).
|
|
162
|
+
- **Quantization rungs** - the fit ladder is full-precision resident → int8 resident → **NF4 resident**
|
|
163
|
+
→ sequential offload → wont-fit. NF4 is what makes a 32B model viable on a 24 GB card. Note int8
|
|
164
|
+
forces bf16 (torchao's weight-only int8 silently no-ops under fp16) while NF4 does not, so a Turing
|
|
165
|
+
card keeps its fp16 tensor cores under NF4.
|
|
166
|
+
- **A pre-reduced checkpoint must not be re-reduced, structurally or numerically.** MiniMax H3's
|
|
167
|
+
`pruned` builds ship the AdaLN branch already factorised to rank 8 and drop the timestep path
|
|
168
|
+
entirely, so re-running our factorisation multiplies a `[96768, 8]` projection by a full-width
|
|
169
|
+
basis. `minimaxh3/pipeline.py` turns `factorise_adaln` off for those, the same way the rule below
|
|
170
|
+
turns quantization off for a prequantized file. Both are the same rule: the source is already in
|
|
171
|
+
the target form.
|
|
172
|
+
- **Size a checkpoint by what it becomes, not by what it weighs.** A pruned file has already lost
|
|
173
|
+
its AdaLN branch and an fp8 file stores half the bytes it will occupy once dequantised, so scaling
|
|
174
|
+
the on-disk number under-sizes both, by up to 3x. `minimaxh3.requirements.resident_bytes` counts
|
|
175
|
+
from the header. Under-sizing is the dangerous direction: the fit ladder then promises a machine
|
|
176
|
+
that dies to a host-RAM OOM kill instead of raising.
|
|
177
|
+
- **Prequantized checkpoints must not be re-quantized.** A checkpoint that ships already quantized
|
|
178
|
+
(`flux2/variants.is_prequantized`) has an on-disk size that already _is_ its resident size, so the
|
|
179
|
+
ladder's assumption that quantization halves it does not hold, and handing diffusers a second,
|
|
180
|
+
different quantization config is a hard error. Pass `Quantization.NONE` for those.
|
|
181
|
+
- **Staged loading** - when the text encoder and the transformer cannot be co-resident (dev is a
|
|
182
|
+
15 GB encoder beside an 18 GB transformer), the prompt is encoded first and the encoder freed before
|
|
183
|
+
the transformer loads. The decision has to be made _before_ the load: by the time an OOM fires there
|
|
184
|
+
is nothing left to free.
|
|
185
|
+
- **Multi-GPU** - `INLINE_PARALLEL` (e.g. `pipefusion=2`, `pipefusion=2,ulysses=2`); degrees multiply
|
|
186
|
+
to the world size, which must equal the GPU count.
|
|
187
|
+
|
|
188
|
+
### The `/v1` API (the contract with Inline Studio)
|
|
189
|
+
|
|
190
|
+
- `POST /v1/runs {graph, target}` → `{runId}` (validated up front; 422 on a bad graph, 409 on a
|
|
191
|
+
reused `clientRunId` with a different graph).
|
|
192
|
+
- `GET /v1/runs/{id}` → durable run state. `DELETE /v1/runs/{id}` cancels.
|
|
193
|
+
- `GET /v1/runs/{id}/events` (websocket) → a `snapshot`, then `progress` / `node_done` / `run_done`.
|
|
194
|
+
- `GET /v1/models` → node descriptors + `registryVersion` (ETag-aware; folds in the model-file scan).
|
|
195
|
+
- `GET /v1/models/{type}`, `GET /v1/takes/{id}`, `GET /v1/takes/{id}/bytes`, `POST /v1/assets`,
|
|
196
|
+
`GET /v1/health`.
|
|
197
|
+
|
|
198
|
+
Errors are `{error: {code, message, nodeId?}}` with the right HTTP status - they never leak a raw
|
|
199
|
+
traceback. The JSON shapes live in `server/serialize.py`.
|
|
200
|
+
|
|
201
|
+
## Multi-GPU (xDiT): split one image across GPUs
|
|
202
|
+
|
|
203
|
+
One image's **denoise loop** (the expensive part) runs collectively across GPUs - not "one image per
|
|
204
|
+
GPU". It's done with xfuser in an isolated worker group (one process per GPU via `torchrun`, over
|
|
205
|
+
local IPC) behind the `XFuserBatchedSampler` seam. Single-GPU/CPU runs take the in-process path and
|
|
206
|
+
pay no overhead. Split method is chosen from the detected interconnect: **PipeFusion** (default, PCIe)
|
|
207
|
+
or **Ulysses** (NVLink). The policy and IPC round-trip are in place and tested with a stub worker; the
|
|
208
|
+
real xfuser denoise lands with the GPU-side runner (C2). Keep `sampling/batch.py` torch-free - the
|
|
209
|
+
real codec that moves tensors lives with the model runner.
|
|
210
|
+
|
|
211
|
+
## Code standards (non-negotiable)
|
|
212
|
+
|
|
213
|
+
- **Typed, strict.** `pyright` in strict mode (`[tool.pyright]`, `typeCheckingMode = "strict"`), all of
|
|
214
|
+
`src` + `tests`. No silent `Any` leaks across component/graph boundaries.
|
|
215
|
+
- **Comments are one line.** Not two, not a paragraph, and only for the **why** a reader can't infer
|
|
216
|
+
from the code - a non-obvious constraint, a rejected alternative, an ordering that matters. Module
|
|
217
|
+
docstrings: one sentence. Function docstrings: one line, or none when the signature says it.
|
|
218
|
+
Never narrate what the code does, never write an essay in a docstring, never leave a comment that
|
|
219
|
+
restates the line below it. If the reasoning genuinely needs more, it belongs in a doc, not in
|
|
220
|
+
the source.
|
|
221
|
+
- **Lint.** `ruff` with `select = ["E", "F", "I", "UP", "B"]`, line length 100, target `py311`.
|
|
222
|
+
- **Typed graph, validated before run.** Never execute an unvalidated graph. Edge type-checking
|
|
223
|
+
(`graph/validate.py` + `port_satisfies`) rejects bad wiring at submit. New port kinds go in
|
|
224
|
+
`schema.py`.
|
|
225
|
+
- **Device policy owns placement.** Components and runners **never** self-assign a device/dtype/
|
|
226
|
+
offload - they call `ctx.policy.placement(role)` (`text_encoder`, `denoiser`, `vae`, …). This is the
|
|
227
|
+
rule that keeps one graph portable across GPU / low-VRAM / CPU / multi-GPU. The policy **prefers the
|
|
228
|
+
GPU**: a low-VRAM GPU keeps weights resident (tiling/slicing/int8 do the saving) and does not
|
|
229
|
+
auto-offload to CPU (`placement.offload` defaults False; opt in with `INLINE_ALLOW_CPU_OFFLOAD`).
|
|
230
|
+
- **Graph never runs the denoise inline.** A model runner lowers to components and submits a
|
|
231
|
+
`SampleJob` through the batched-sampler seam. The executor orchestrates; it does not sample.
|
|
232
|
+
- **Immutable takes.** The `TakeStore` owns bytes/hash/uri; regenerating adds a take. Never overwrite.
|
|
233
|
+
- **Engine deps are optional and import-guarded.** Heavy deps (torch, diffusers, xfuser) live in
|
|
234
|
+
`[project.optional-dependencies]` extras (`runtime`, `server`, `parallel`, `dev`). **`runtime` is
|
|
235
|
+
the single shared ML stack - a new model must reuse it, never declare its own torch/diffusers
|
|
236
|
+
block.** Model-runner
|
|
237
|
+
subpackages import torch/diffusers at module top **on purpose**: an absent extra makes the import
|
|
238
|
+
raise, and `server/bootstrap.py` skips that model best-effort so a core install still boots and
|
|
239
|
+
serves source nodes. Never import a heavy dep at package top level outside a runner subpackage.
|
|
240
|
+
- **Engine isolation.** All xDiT/worker knowledge lives behind `parallel/` and the sampler seam.
|
|
241
|
+
Don't scatter it.
|
|
242
|
+
- **Bring-your-own models.** Nothing is downloaded by the engine. The catalog scans; the user places
|
|
243
|
+
files. A model picker is a `SELECT` param with `options_from="<category>"`.
|
|
244
|
+
- **Adapter strength is not a quality metric, and a threshold on it is a false-positive machine.**
|
|
245
|
+
Measured against real bases, published LoRAs that work well span `|B@A| / |W|` from 0.017%
|
|
246
|
+
(a style LoRA) to 1.2% (a restoration LoRA), so "this adapter looks weak" is not a finding. What
|
|
247
|
+
predicts a LoRA doing nothing is whether its per-weight change clears one quantization step. Warn
|
|
248
|
+
on that, and only when the base is actually quantized.
|
|
249
|
+
- **Patching a diffusers object may patch a copy, and it will not tell you.**
|
|
250
|
+
`ModularPipeline.blocks` is a property returning `deepcopy(self._blocks)`, so hooking the block
|
|
251
|
+
graph through it installs cleanly onto a throwaway and reports success. That is how H3's denoise
|
|
252
|
+
ran with no per-step progress while the hook said it was attached. Reach for the backing
|
|
253
|
+
attribute, and prove a hook fires against the real object rather than trusting a return value.
|
|
254
|
+
- **Verify image models by rendering.** The FLUX.2 work shipped five bugs past a green test suite,
|
|
255
|
+
and every one produced a _wrong image rather than an error_: a mis-keyed checkpoint, a
|
|
256
|
+
vision-language encoder loaded in place of a text one, an unnormalized latent, and a control context
|
|
257
|
+
cast to a quantized weight's `uint8` storage dtype. A unit test cannot see a plausible-but-wrong
|
|
258
|
+
image. Render something and look at it.
|
|
259
|
+
- **Launchers are twins.** `webui.sh` and `webui.bat` change together; only the `launcher` CI job
|
|
260
|
+
can prove the `.bat`, since it cannot run on a dev box.
|
|
261
|
+
- **Match CUDA arches by within-major compatibility, never exactly.** An `sm_8x` cubin runs on any
|
|
262
|
+
`sm_8y` where `y >= x`, so `sm_86` covers Ada's `sm_89`.
|
|
263
|
+
- **Pass the widest `uv` flag that works.** `--no-sources-package` needs uv 0.10+; `--no-sources`
|
|
264
|
+
works back to 0.4 and means the same while torch is the only `[tool.uv.sources]` entry.
|
|
265
|
+
- **An explicit user setting beats a heuristic.** Test `on`/`off` before any auto rule, or the
|
|
266
|
+
control is silently dead for whichever arch the rule excludes.
|
|
267
|
+
- **Report a phase before the slow work, not after.** Progress emitted only on completion makes a
|
|
268
|
+
slow step look like a hung previous phase.
|
|
269
|
+
- **In a `.bat`, `call` anything that might be a `.bat`.** `nvidia-smi` is sometimes a shim, and
|
|
270
|
+
without `call` it takes over the script and never returns.
|
|
271
|
+
- **Log allocated AND reserved VRAM.** `nvidia-smi` shows only reserved, so allocator cache and a
|
|
272
|
+
leaked reference look identical from outside.
|
|
273
|
+
- **Tests (pytest).** Cover the logic that matters: graph validate/topo/executor/cache, the catalog
|
|
274
|
+
scan, the run store + server contract, the device/memory policy, the parallel group + xfuser seam,
|
|
275
|
+
and each model runner (import-guarded, no GPU needed). See `tests/`.
|
|
276
|
+
- **Commits.** Conventional Commits (`feat:`, `fix:`, `chore:`), small and scoped.
|
|
277
|
+
|
|
278
|
+
## Commands
|
|
279
|
+
|
|
280
|
+
```
|
|
281
|
+
uv venv # create ./.venv
|
|
282
|
+
# --python pins the target: without it uv installs into an activated venv/conda env, not ./.venv
|
|
283
|
+
uv pip install --python .venv/bin/python -e ".[server,dev]" # engine + server + test tooling
|
|
284
|
+
uv pip install --python .venv/bin/python -e ".[runtime]" # + torch, diffusers, transformers
|
|
285
|
+
uv pip install --python .venv/bin/python -e ".[runtime,parallel]" # + xfuser, multi-GPU denoise
|
|
286
|
+
|
|
287
|
+
./webui.sh # run (loopback:8848); friendly flags → INLINE_* env
|
|
288
|
+
./webui.sh --listen --port 9000 # bind all interfaces
|
|
289
|
+
./webui.sh --lowvram # tight-VRAM profile
|
|
290
|
+
./webui.sh --install --extra runtime # set up ./.venv with the model runtime, then exit
|
|
291
|
+
# (reuses an existing ./.venv; --recreate rebuilds it, and
|
|
292
|
+
# an activated foreign env is reported, never modified)
|
|
293
|
+
python -m inline_core.server # run the server directly (INLINE_HOST / INLINE_PORT)
|
|
294
|
+
|
|
295
|
+
ruff check . # lint (zero warnings)
|
|
296
|
+
uv run pytest -q # tests (no GPU; model code is import-guarded)
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
## Where to add things
|
|
300
|
+
|
|
301
|
+
- **New video model** → do **not** rediscover the plumbing; it exists as shared seams, and
|
|
302
|
+
`models/minimaxh3/` is the reference caller:
|
|
303
|
+
- `runtime/video_encode.py` + `TakeStore.save_video` / `save_audio` - frames plus a waveform to one
|
|
304
|
+
playable MP4. A model that generates video and its soundtrack jointly returns **both** takes;
|
|
305
|
+
only the one matching the descriptor's `output_kind` claims the node's canvas slot (see
|
|
306
|
+
`studio/generation._save_take`, and `tests/test_output_kind_contract.py` which keeps the
|
|
307
|
+
declarations honest).
|
|
308
|
+
- `models/video_params.py` - `VideoGrid` + `video_param_fields(...)`, the way
|
|
309
|
+
`sampling_param_fields(...)` already works. A duration snaps **up** onto the model's frame grid
|
|
310
|
+
and is then clamped into the model's window, which is what both reference implementations do:
|
|
311
|
+
asking H3 for 10 seconds gives 10.125, not 9.417. **fps is a model constant, never a param**,
|
|
312
|
+
or it desyncs from the grid.
|
|
313
|
+
- `models/references.py` - wired image/video/audio ports as one ordered, numbered list. Wiring
|
|
314
|
+
order is what the prompt addresses, so it is meaning, not decoration.
|
|
315
|
+
- `models/keymap.py` - load a checkpoint written for another implementation. Declare a key plan
|
|
316
|
+
(rename / split / swap halves / drop / assert-equal) and apply it while weights stream in. The
|
|
317
|
+
transforms it performs are the ones that fail **silently**, so a plan declares its expected row
|
|
318
|
+
layout and the detector measures the real one. It needs the **whole tensor**: one head's worth of
|
|
319
|
+
rows cannot tell the layouts apart, and it raises rather than guessing.
|
|
320
|
+
- `models/prepared.py` - cache a quantised model once. Everything that changes the bytes goes in
|
|
321
|
+
the hash, including model-specific flags, or switching a flag serves a stale artifact.
|
|
322
|
+
- `models/offload.py` - the device policy's plan to a concrete torchao + group-offload recipe,
|
|
323
|
+
plus **split residency**: group offload holds the whole model in host RAM, so a model bigger
|
|
324
|
+
than the RAM available has nowhere to sit and the kernel swaps it. `blocks_to_place` sizes the
|
|
325
|
+
overflow and those leading blocks go on the accelerator instead, placed as they land rather
|
|
326
|
+
than after the load. It moves the minimum, because every block left resident is VRAM the
|
|
327
|
+
render wanted for activations.
|
|
328
|
+
- **A group-offloaded model's host footprint is reclaimable at load and unreclaimable one step
|
|
329
|
+
later, so never size a split from free memory during the load.** Streaming from a safetensors
|
|
330
|
+
mmap leaves the CPU-side weights as clean file-backed pages the kernel can drop and re-read for
|
|
331
|
+
free. The first denoising step ends that: group offload returns each block with
|
|
332
|
+
`module.to("cpu")`, which allocates fresh anonymous memory and drops the file-backed storage.
|
|
333
|
+
A planner reading `available` mid-load is reading a number that is about to stop being true,
|
|
334
|
+
and the failure mode is not an exception. It is the machine resetting with the page cache
|
|
335
|
+
converted out from under it, no OOM message and no shutdown sequence. Budget the full
|
|
336
|
+
post-conversion footprint, and count what other components will claim from the same RAM
|
|
337
|
+
afterwards (a leaf-offloaded VAE lands there too).
|
|
338
|
+
- **Ordering, when a load both transforms and quantises:** structural transform first,
|
|
339
|
+
quantisation last, and a prequantized source takes no structural transform at all. The three
|
|
340
|
+
clauses and why they are not negotiable are in `models/offload.py`'s docstring.
|
|
341
|
+
- **Vendoring unreleased upstream code** → `models/<name>/vendor/`, **verbatim, import rewrites
|
|
342
|
+
only**. Put a provenance header in its `__init__.py` naming the repo, PR, branch, commit sha and
|
|
343
|
+
date. `models/*/vendor/` is already excluded from ruff and pyright by a glob, because editing it to
|
|
344
|
+
satisfy our linters destroys the one property that makes a re-sync reviewable. Never patch
|
|
345
|
+
installed diffusers: construct components directly and pass them in, so nothing resolves a class by
|
|
346
|
+
name through a registry we do not own. Pin, don't floor, any dependency whose experimental surface
|
|
347
|
+
the vendored code imports from.
|
|
348
|
+
- **New model runner** → a subpackage `models/<name>/` with `runner.py` (a `NodeDescriptor` + a
|
|
349
|
+
`NodeRunner` + `register_<name>(registry, store, policy)`) and an `__init__.py` re-exporting it;
|
|
350
|
+
add a `try/except ImportError` block in `server/bootstrap.py`; add an optional-deps extra in
|
|
351
|
+
`pyproject.toml`. Copy `models/zimage/` - it's the reference.
|
|
352
|
+
- **New low-level primitive** → descriptor in `graph/primitives.py`; its runner lands with the C2 work
|
|
353
|
+
(build a component in `components/`, wire it through `encode`/`sample`/`vae` and the sampler seam).
|
|
354
|
+
- **New `/v1` route** → add it in `server/app.py`, shape the JSON in `server/serialize.py`, keep errors
|
|
355
|
+
as `{error:{code,message}}` with the right status. Update the API list in `README.md`.
|
|
356
|
+
- **New port/handle type** → `PortKind` in `graph/schema.py` (+ `port_satisfies` if it has coercions).
|
|
357
|
+
- **New device/memory behaviour** → behind `DevicePolicy` in `device/`; never in a component.
|