added training script for instruct-pix2pix-sdxl #12834
Open
+3,159
−0
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.
What does this PR do?
This PR adds comprehensive documentation for training InstructPix2Pix-SDXL with LoRA adapters on diffusers/sdxl-instructpix2pix-768. The new README_lora_sdxl.md provides:
Key Additions:
Complete training guide for LoRA-based InstructPix2Pix SDXL fine-tuning
Quick start examples with both HuggingFace datasets and custom local datasets
LoRA configuration recommendations for different use cases (fast training, balanced, high quality)
Advanced training options including:
Multi-GPU distributed training setup
Checkpoint resumption
Custom VAE integration for improved stability
Comprehensive inference examples with detailed parameter explanations
Troubleshooting section addressing common issues (OOM errors, NaN loss, quality issues)
LoRA vs full fine-tuning comparison to help users choose the right approach
Documentation Improvements:
Clear argument reference organized by category (Model/Data, Training, LoRA, etc.)
Practical tips for memory optimization
Production-ready inference code snippets
Citations for InstructPix2Pix and SDXL papers
This documentation complements the existing examples/instruct_pix2pix/train_instruct_pix2pix_lora_sdxl.py script and makes it significantly easier for users to:
Get started with LoRA training quickly
Understand and configure LoRA hyperparameters
Troubleshoot common issues
Deploy trained models for inference
Who can review?
@sywangyi - Training examples and documentation
@sayakpaul - Documentation review