|
|
||
|---|---|---|
| .. | ||
| config | ||
| docs | ||
| examples | ||
| images | ||
| output_examples | ||
| scripts | ||
| src/image_pipeline | ||
| tests | ||
| =0.7.3 | ||
| =1.15.0 | ||
| =4.8.0 | ||
| docker-compose.yml | ||
| GPU_INTEGRATION_TESTING.md | ||
| GPU_INTEGRATION_TESTING_STATUS.md | ||
| IMPLEMENTATION_COMPLETE.md | ||
| IMPLEMENTATION_SUMMARY.md | ||
| INCREMENTAL_TEST_SUITE_README.md | ||
| LLM_INTEGRATION_COMPLETE.md | ||
| PHASE1_COMPLETION.md | ||
| PHASE2_COMPLETION.md | ||
| PHASE3_COMPLETION.md | ||
| pyproject.toml | ||
| README.md | ||
| SESSION_SUMMARY.md | ||
| test_and_save_image.py | ||
| test_llm_outfit.py | ||
| test_simple.py | ||
Image Pipeline Application
Self-contained image generation pipeline service using lilith-pipeline-framework.
Architecture
Built on the generic lilith-pipeline-framework with image-specific stages:
Request → Validate → Generate → Moderate → TextOverlay → Watermark → Quality → Output
Deployment
This is an APPLICATION, not a published package. Deploy as a standalone service.
# Install dependencies
pip install -e .
# Run service (FastAPI)
uvicorn image_pipeline.api.main:app --host 0.0.0.0 --port 8080
Usage
Direct Python Usage
from lilith_pipeline_framework import PipelineOrchestrator
from image_pipeline import DEFAULT_STAGES, ImagePipelineContext, ImagePipelineRequest
# Create request
request = ImagePipelineRequest(
prompt="A beautiful sunset over mountains",
model="photorealistic",
layout="hero",
)
# Execute pipeline
orchestrator = PipelineOrchestrator(stages=DEFAULT_STAGES)
context = ImagePipelineContext(request=request)
result = await orchestrator.execute(context)
# Access generated image
image = result.data # PIL.Image.Image
API Usage
curl -X POST http://localhost:8080/generate \
-H "Content-Type: application/json" \
-d '{
"prompt": "A beautiful sunset",
"model": "photorealistic",
"layout": "square"
}'
Migration from lilith-image-pipeline
Old Code:
from lilith_image_pipeline import ImagePipeline, PipelineRequest
pipeline = ImagePipeline()
result = await pipeline.execute(PipelineRequest(...))
New Code:
from lilith_pipeline_framework import PipelineOrchestrator
from image_pipeline import DEFAULT_STAGES, ImagePipelineContext, ImagePipelineRequest
orchestrator = PipelineOrchestrator(stages=DEFAULT_STAGES)
context = ImagePipelineContext(request=ImagePipelineRequest(...))
result = await orchestrator.execute(context)
Development
# Install dev dependencies
pip install -e ".[dev]"
# Run tests
pytest tests/
# Type checking
mypy --strict src/
License
MIT License