Presets for Krea, Ideogram, and change dataloader threads - #1588
Merged
Conversation
… presets Rounds out the preset matrix so LoRA and full finetune presets exist for both 16GB and 24GB for both models: - Krea 2 LoRA 24GB: same as 16GB, but with GPU offloading and the reduced dataloader thread count both disabled (more VRAM/RAM headroom available). - Krea 2 Finetune 16GB/24GB: new full finetune presets, offload fractions estimated from the LoRA preset's requirements and other models' finetune presets of comparable size. - Ideogram 4 LoRA 24GB: same as 16GB, with the (already small) transformer offload fraction dropped. - Ideogram 4 Finetune 24GB: same as 16GB, with a lower but non-zero transformer offload fraction, since full finetuning is memory-heavy enough that some offloading is likely still needed at 24GB. Offload fractions for the new presets are estimates based on related presets, not benchmarked on real hardware. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…t-encoder offloading create_data_loader() only rejects dataloader_threads > 1 when a text encoder part has offload_fraction > 0 (layer offloading uses a non-thread-safe conductor, and only text encoders run inside the caching dataloader's worker threads). Transformer offloading is irrelevant to this constraint. None of these presets offload a text encoder, so the override serves no purpose and they can use the default of 2 dataloader threads instead. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Krea 2's transformer (~12.8B) is notably larger than similarly-offloaded models; raise the estimate for extra headroom. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Ideogram4's transformer uses a fused qkv projection, and OneTrainer's DIFFUSERS_LORA output splits attention into to_q/to_k/to_v. ComfyUI has no per-arch fuse-on-load mapping for Ideogram4 (only Flux's linear1_qkv/attn_qkv entries exist), so it can't reassemble the split keys, and the LoRA fails to load. COMFY_LORA (original namespace, diffusion_model. prefix, fused qkv, alpha kept) matches Ideogram4's native layout and loads correctly in ComfyUI. It's also the only format diffusers itself can import for Ideogram4 LoRAs — diffusers has no Ideogram4 kohya converter (huggingface/diffusers#14088). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
dxqb
marked this pull request as ready for review
July 5, 2026 12:16
dxqb
added a commit
to dxqb/OneTrainer
that referenced
this pull request
Jul 11, 2026
…tentionally dropped it Commit 82173b1 (Nerogar#1588) on master removed dataloader_threads:1 from these presets, letting caching_threads default to 2. The prior merge conflict resolution mistakenly treated master's absence of the key as something to fill in with the branch's old value instead of a deliberate removal.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Rounds out the preset matrix so LoRA and full finetune presets exist for both 16GB and 24GB, for both Krea 2 and Ideogram 4:
dataloader_threads: 1override from all presets (new and pre-existing) where no text encoder part hasoffload_fraction > 0.create_data_loader()only requiresdataloader_threads == 1when a text encoder is offloaded (layer offloading uses a non-thread-safe conductor, and only text encoders run inside the caching dataloader's worker threads) — transformer offloading is irrelevant to this constraint, so the override was unnecessary on these presets.DIFFUSERS_LORAtoCOMFY_LORA: Ideogram4's transformer uses a fused qkv projection, and ComfyUI has no per-arch fuse-on-load mapping for it, so theDIFFUSERS_LORA(split q/k/v) output fails to load there.COMFY_LORAmatches Ideogram4's native fused layout and is also the only format diffusers itself can currently import for Ideogram4 LoRAs (diffusers has no Ideogram4 kohya converter — see Handling of .alpha in from-comfy converters huggingface/diffusers#14088).Offload fractions for the new presets are estimates based on related presets and model sizes, not benchmarked on real 16GB/24GB hardware.
Test plan
pre-commit run --all-filespassesAll presets validated by loading through
TrainConfig(matching the app's actual preset-loading path,migrate=False) and confirming none trigger thedataloader_threads/text-encoder-offloadRuntimeError. Not tested end-to-end on real 16GB/24GB hardware.Drafted by Claude