How zhuminglian/shine works
SHINE is a training-free image-composition framework: a user supplies a foreground reference and mask, a background with placement information, and a prompt; an adapter- or LoRA-based inference entry point generates a composition. The model code includes customized FLUX components for subject conditioning and attention. Separate evaluation scripts assess single images and the DreamEditBench and ComplexCompo benchmarks using image-similarity and quality metrics. The README documents these workflows and capabilities; several script and model connections are therefore represented at the documented subsystem level because their full source was not sampled.
Main entry points: pipeline.py Adapter Pipeline · evaluation.py Single Image Evaluation · SHINE_pipeline_flux.py LoRA Pipeline · evaluation_complexcompo.py ComplexCompo Evaluation
Components 19
Composition Inference
- Foreground And Scene
examples - Adapter Entry
scripts/main_adapter.py - LoRA Entry
scripts/main_lora.py - Composed Images
SHINE Model
- Adapter Pipeline
models/adapter/pipeline.py - LoRA Pipeline
models/lora/SHINE_pipeline_flux.py - FLUX Transformer
models/SHINE_transformer_flux.py - Adapter Attention
models/adapter/attn_processor.py - LoRA Attention
models/lora/SHINE_attn_processor.py - Subject Resampler
models/adapter/resampler.py
Evaluation Workflows
- Single Image Evaluation
evaluation/evaluation.py - ComplexCompo Evaluation
evaluation/evaluation_complexcompo.py - DreamEditBench Evaluation
evaluation/evaluation_dreameditbench.py - Benchmark Data
examples - Evaluation Scores
Evaluation Metrics
- CLIP Similarity
tools/clip_score.py - IRF Similarity
tools/IRF_score.py - DINOv2 Similarity
tools/dinov2_score.py
Other components
- User
Connections 27
- User → Foreground And Scene: provides inputs
- User → Adapter Entry: runs inference
- User → LoRA Entry: runs inference
- Foreground And Scene → Adapter Entry: supplies scene
- Foreground And Scene → LoRA Entry: supplies scene
- Adapter Entry → Adapter Pipeline: invokes
- LoRA Entry → LoRA Pipeline: invokes
- Adapter Pipeline → FLUX Transformer: denoises with
- LoRA Pipeline → FLUX Transformer: denoises with
- Adapter Pipeline → Adapter Attention: uses attention
- LoRA Pipeline → LoRA Attention: uses attention
- Adapter Pipeline → Subject Resampler: projects subject features
- Adapter Pipeline → Composed Images: returns images
- LoRA Pipeline → Composed Images: returns images
- User → Single Image Evaluation: evaluates image
- User → ComplexCompo Evaluation: evaluates benchmark
- User → DreamEditBench Evaluation: evaluates benchmark
- Composed Images → Single Image Evaluation: provides results
- Composed Images → ComplexCompo Evaluation: provides results
- Composed Images → DreamEditBench Evaluation: provides results
- Benchmark Data → ComplexCompo Evaluation: provides references
- Benchmark Data → DreamEditBench Evaluation: provides references
- Single Image Evaluation → CLIP Similarity: calculates similarity
- Single Image Evaluation → IRF Similarity: calculates similarity
- Single Image Evaluation → DINOv2 Similarity: calculates similarity
- ComplexCompo Evaluation → Evaluation Scores: aggregates metrics
- DreamEditBench Evaluation → Evaluation Scores: aggregates metrics