Add QwenImageEditLoRA contrib model: Multi-LoRA diffusion on Trainium2#166
Open
jimburtoft wants to merge 1 commit into
Open
Add QwenImageEditLoRA contrib model: Multi-LoRA diffusion on Trainium2#166jimburtoft wants to merge 1 commit into
jimburtoft wants to merge 1 commit into
Conversation
Multi-LoRA runtime adapter switching for Qwen-Image-Edit-2511 on trn2. Uses ModelBuilder SPMD trace with input_output_aliases for zero-copy LoRA buffer updates at runtime (<1ms, no recompilation). - 60-layer MMDiT transformer with NKI Flash Attention - TP=4 sharding (trn2.3xlarge, LNC=2) - 14 LoRA targets per block (840 A + 840 B buffers) - Integration tests: compilation, inference, aliasing, buffer count
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
input_output_aliasesfor zero-copy LoRA buffer updates (<1ms, no recompilation)Model Details
Qwen/Qwen-Image-Edit-2511fal/Qwen-Image-Edit-2511-Multiple-Angles-LoRAKey Features
write_to_neuron_buffer()updates 1,680 LoRA buffers (840 A + 840 B) at runtime without recompilationBenchmark (1024x1024, 28 steps, CFG)
Integration Tests
All 5 tests pass on trn2.3xlarge:
test_compilation_produces_artifacts— verifies NEFF + weight filestest_inference_produces_valid_output— non-zero, finite outputstest_lora_aliasing_changes_output— LoRA injection changes outputtest_lora_zero_restores_baseline— zeroing LoRA restores deterministic baselinetest_lora_buffer_count— exactly 840 A + 840 B keys per rankFiles