Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Single Image Inference

python src/run_inference.py \
    --model path/to/stable-diffusion-v1-5 \
    --lora path/to/lora.safetensors \
    --prompt "(masterpiece, best quality), 1boy, engineer, workshop" \
    --negative_prompt "easynegative, bad-hands-5" \
    --strength 0.8 \
    --steps 30 \
    --seed 3372287738 \
    --output results/output.png

Sampler Ablation Study

Reproduce the paper's systematic evaluation across all sampler and strength combinations:

python src/sampler_ablation.py \
    --model path/to/stable-diffusion-v1-5 \
    --lora path/to/lora.safetensors \
    --prompt "(masterpiece,best quality,absurdres,lineart:1),original design,1boy,(technology:1.4),Engineer" \
    --negative_prompt "easynegative,verybadimagenegative_v1.3,bad-hands-5" \
    --output results/ablation \
    --seed 3372287738

To test a subset of samplers or strengths:

python src/sampler_ablation.py \
    --model path/to/model \
    --lora path/to/lora.safetensors \
    --prompt "your prompt" \
    --samplers DDIM "DPM++2M_Karras" \
    --strengths 0.4 0.5 0.6 0.7 \
    --steps 20 30

Results are saved as: results/ablation/{sampler}/{strength}/steps_{n}.png


Samplers Tested

Sampler Notes
DDIM Competent results; color artifacts at high steps
DPM++ 2M Karras Best overall quality and consistency
DPM++ 2M SDE Stochastic variant, slightly more variation
DPM++ 2M SDE Karras Good quality with Karras noise schedule
Euler a Fast, good for quick iteration
PLMS Stable but lower detail ceiling
UniPC Fast convergence at low step counts

Results Summary

Tested with static seed 3372287738 to eliminate randomness as a variable:

  • Optimal LoRA strength: 0.5-0.6 for this dataset
  • Above 0.6: Dataset artifacts (background, clothing) begin burning into output
  • Best sampler: DPM++ 2M Karras at 30-40 steps
  • Diminishing returns: Minimal quality improvement above 40 steps

Citation

@inproceedings{culafic2024lora,
  title={Output Manipulation via LoRA for Generative AI},
  author={Culafic, Igor},
  booktitle={IEEE Conference},
  year={2024},
  url={https://ieeexplore.ieee.org/document/10495995}
}

About

LoRA training and sampler ablation study for Stable Diffusion — IEEE 2024

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages