Repository navigation
[diffusion] Support Ideogram TurboTime LoRA inference - #30487
Conversation
|
Warning Gemini encountered an error creating the review. You can try again by commenting |
44f855f to
d19066d
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces support for Ideogram 4 TurboTime LoRA presets, dynamic-only LoRA for weight-only FP8 linear layers, and conditional-only denoising by skipping unconditional generation. The review feedback highlights critical issues regarding Tensor Parallelism compatibility, where other LoRA linear subclasses override the forward method and ignore the new lora scale helper. Additionally, it is recommended to move the import of get_forward_context to the module level to avoid overhead in the hot path, and to dynamically inspect the signature of _refresh_cache_dit_context to prevent TypeError crashes in other subclasses that do not yet accept the new ctx parameter.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
d19066d to
dff4c8d
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces support for dynamic LoRA scaling, weight-only FP8 LoRA layers, and optimized denoising presets (such as skipping unconditional transformer steps) for Ideogram 4. The reviewer feedback suggests removing the dynamic inspect.signature check in the progressive resolution denoising stage by updating the base class and subclass signatures of _refresh_cache_dit_context to accept ctx directly. Additionally, it is recommended to add type annotations to the newly introduced _add_lora_delta helper method in linear.py for better static analysis and readability.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
dff4c8d to
d00f229
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces support for Ideogram 4 Turbotime LoRA presets, enabling features like skipping unconditional denoising steps and scaling LoRA weights dynamically at runtime. It also adds a dynamic-only LoRA wrapper for storage-only FP8 linear layers. Feedback on the changes highlights a potential AttributeError in _runtime_lora_scale when accessing the forward context, and a potential TypeError in other models' progressive denoising stages if they override _refresh_cache_dit_context without accepting the new ctx parameter.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
@mickqian @AgainstEntropy Kindly review this PR, thanks! |
|
/tag-and-rerun-ci |
sgl-project#43028's base carries the old 4-site LoRA forwards plus the runtime scale input from sgl-project#30487; this stack has the sgl-project#37460 rework and no runtime scale, so the three commits land as their net final state: BaseLayerWithLoRA. _scale_lora_delta folds alpha/rank and strength multiplies, skipping elementwise muls entirely at unit scale (measured ~6%/multiply on LTX-2 refinement LoRA stages). Ported test counts aten.mul ops at 0/1 across strength x {nn.Linear, ReplicatedLinear}. PR commits: 051cf1c 6d9f811 17302ee
Motivation
This PR adds support for Ideogram 4 TurboTime-style distilled LoRA inference, targeting the public ostris/ideogram_4_turbotime_lora adapter. This LoRA is designed for few-step generation with no CFG and no unconditional transformer branch.
Modifications
Add Ideogram 4 TurboTime LoRA presets:
V4_TURBOTIME_LORA_2V4_TURBOTIME_LORA_4V4_TURBOTIME_LORA_8Add request-local LoRA scaling for diffusion LoRA layers.
V4_DEFAULT_20,V4_QUALITY_48, andV4_TURBO_12useruntime_lora_scale=0.0, so they can still run the base model even when the server is started with--lora-path.runtime_lora_scale=1.0and require an active LoRA on the main transformer.Support request-local dynamic LoRA for Ideogram 4 quantized checkpoints.
Update the Ideogram 4 denoising path to skip the unconditional transformer when the selected preset declares
skip_unconditional=True.Update progressive-resolution Cache-DiT refresh logic so that, when the unconditional branch is skipped, only the active transformer context is refreshed.
Accuracy Tests
Accuracy Tests
Manual smoke tests were run with Ideogram 4 FP8 and the public TurboTime LoRA adapter.
Server command:
Tested presets:
V4_DEFAULT_20,V4_QUALITY_48,V4_TURBO_12V4_TURBOTIME_LORA_2,V4_TURBOTIME_LORA_4,V4_TURBOTIME_LORA_8Example request:
Also verified request-local behavior with the same prompt and seed sequence:
V4_DEFAULT_20V4_TURBOTIME_LORA_8V4_DEFAULT_20The two
V4_DEFAULT_20requests used the base-model path, whileV4_TURBOTIME_LORA_8used the LoRA path and skipped the unconditional transformer branch.Speed Tests and Profiling
LORA_8
LORA_4
LORA_2
Checklist
Review and Merge Process
/tag-and-rerun-ci,/tag-run-ci-label,/rerun-failed-ciCI States
Latest PR Test (Base): ✅ Run #37406235131
Latest PR Test (Extra): ❌ Run #37406234816
Latest PR Test (AMD ROCm 10): ❌ Run #37406235070