Skip to content

Presets for Krea, Ideogram, and change dataloader threads - #1588

Merged
dxqb merged 4 commits into
Nerogar:mergefrom
dxqb:preset-16-24gb-krea-ideogram
Jul 5, 2026
Merged

Presets for Krea, Ideogram, and change dataloader threads#1588
dxqb merged 4 commits into
Nerogar:mergefrom
dxqb:preset-16-24gb-krea-ideogram

Conversation

@dxqb

@dxqb dxqb commented Jul 5, 2026

Copy link
Copy Markdown
Collaborator

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:

  • Krea 2 LoRA 24GB: same as 16GB, 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 are estimates based on the LoRA preset's requirements and other models' finetune presets of comparable size (Krea 2's transformer is ~12.8B params, vs. e.g. Ideogram 4's ~9.3B).
  • 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.
  • Dropped the dataloader_threads: 1 override from all presets (new and pre-existing) where no text encoder part has offload_fraction > 0. create_data_loader() only requires dataloader_threads == 1 when 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.
  • Switched the Ideogram 4 LoRA presets from DIFFUSERS_LORA to COMFY_LORA: Ideogram4's transformer uses a fused qkv projection, and ComfyUI has no per-arch fuse-on-load mapping for it, so the DIFFUSERS_LORA (split q/k/v) output fails to load there. COMFY_LORA matches 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-files passes
  • Launched the affected UI or script and exercised the change
  • Tested with at least one real preset / config when relevant (note which: ____)

All presets validated by loading through TrainConfig (matching the app's actual preset-loading path, migrate=False) and confirming none trigger the dataloader_threads/text-encoder-offload RuntimeError. Not tested end-to-end on real 16GB/24GB hardware.


Drafted by Claude

dxqb and others added 4 commits July 5, 2026 12:10
… 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 dxqb changed the title Add 24GB presets for Krea 2 and Ideogram 4, plus Krea 2 full finetune presets Presets Jul 5, 2026
@dxqb
dxqb marked this pull request as ready for review July 5, 2026 12:16
@dxqb dxqb changed the title Presets Presets for Krea, Ideogram, and change dataloader threads Jul 5, 2026
@dxqb
dxqb merged commit 82173b1 into Nerogar:merge Jul 5, 2026
1 check passed
@dxqb
dxqb deleted the preset-16-24gb-krea-ideogram branch July 5, 2026 12:36
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant