ollamadiffuser 1.2.2__tar.gz → 2.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. {ollamadiffuser-1.2.2 → ollamadiffuser-2.0.0}/CHANGELOG.md +165 -0
  2. {ollamadiffuser-1.2.2/ollamadiffuser.egg-info → ollamadiffuser-2.0.0}/PKG-INFO +337 -108
  3. {ollamadiffuser-1.2.2 → ollamadiffuser-2.0.0}/README.md +309 -94
  4. {ollamadiffuser-1.2.2 → ollamadiffuser-2.0.0}/ollamadiffuser/__init__.py +1 -1
  5. ollamadiffuser-2.0.0/ollamadiffuser/api/server.py +450 -0
  6. ollamadiffuser-2.0.0/ollamadiffuser/cli/config_commands.py +119 -0
  7. ollamadiffuser-2.0.0/ollamadiffuser/cli/lora_commands.py +169 -0
  8. ollamadiffuser-2.0.0/ollamadiffuser/cli/main.py +161 -0
  9. ollamadiffuser-2.0.0/ollamadiffuser/cli/model_commands.py +664 -0
  10. ollamadiffuser-2.0.0/ollamadiffuser/cli/recommend_command.py +205 -0
  11. ollamadiffuser-2.0.0/ollamadiffuser/cli/registry_commands.py +197 -0
  12. {ollamadiffuser-1.2.2 → ollamadiffuser-2.0.0}/ollamadiffuser/core/config/model_registry.py +562 -11
  13. {ollamadiffuser-1.2.2 → ollamadiffuser-2.0.0}/ollamadiffuser/core/config/settings.py +24 -2
  14. ollamadiffuser-2.0.0/ollamadiffuser/core/inference/__init__.py +5 -0
  15. ollamadiffuser-2.0.0/ollamadiffuser/core/inference/base.py +182 -0
  16. ollamadiffuser-2.0.0/ollamadiffuser/core/inference/engine.py +226 -0
  17. ollamadiffuser-2.0.0/ollamadiffuser/core/inference/strategies/__init__.py +1 -0
  18. ollamadiffuser-2.0.0/ollamadiffuser/core/inference/strategies/controlnet_strategy.py +170 -0
  19. ollamadiffuser-2.0.0/ollamadiffuser/core/inference/strategies/flux_strategy.py +136 -0
  20. ollamadiffuser-2.0.0/ollamadiffuser/core/inference/strategies/generic_strategy.py +164 -0
  21. ollamadiffuser-2.0.0/ollamadiffuser/core/inference/strategies/gguf_strategy.py +113 -0
  22. ollamadiffuser-2.0.0/ollamadiffuser/core/inference/strategies/hidream_strategy.py +104 -0
  23. ollamadiffuser-2.0.0/ollamadiffuser/core/inference/strategies/sd15_strategy.py +134 -0
  24. ollamadiffuser-2.0.0/ollamadiffuser/core/inference/strategies/sd3_strategy.py +80 -0
  25. ollamadiffuser-2.0.0/ollamadiffuser/core/inference/strategies/sdxl_strategy.py +131 -0
  26. ollamadiffuser-2.0.0/ollamadiffuser/core/inference/strategies/video_strategy.py +108 -0
  27. ollamadiffuser-2.0.0/ollamadiffuser/mcp/server.py +184 -0
  28. {ollamadiffuser-1.2.2 → ollamadiffuser-2.0.0}/ollamadiffuser/ui/templates/index.html +62 -1
  29. {ollamadiffuser-1.2.2 → ollamadiffuser-2.0.0}/ollamadiffuser/ui/web.py +116 -54
  30. {ollamadiffuser-1.2.2 → ollamadiffuser-2.0.0/ollamadiffuser.egg-info}/PKG-INFO +337 -108
  31. {ollamadiffuser-1.2.2 → ollamadiffuser-2.0.0}/ollamadiffuser.egg-info/SOURCES.txt +26 -3
  32. {ollamadiffuser-1.2.2 → ollamadiffuser-2.0.0}/ollamadiffuser.egg-info/entry_points.txt +1 -0
  33. ollamadiffuser-2.0.0/ollamadiffuser.egg-info/requires.txt +48 -0
  34. {ollamadiffuser-1.2.2 → ollamadiffuser-2.0.0}/pyproject.toml +51 -25
  35. ollamadiffuser-2.0.0/tests/test_api_base64.py +76 -0
  36. ollamadiffuser-2.0.0/tests/test_api_server.py +63 -0
  37. ollamadiffuser-2.0.0/tests/test_engine.py +288 -0
  38. ollamadiffuser-2.0.0/tests/test_mcp_server.py +169 -0
  39. ollamadiffuser-2.0.0/tests/test_model_registry.py +180 -0
  40. ollamadiffuser-2.0.0/tests/test_mps_support.py +270 -0
  41. ollamadiffuser-2.0.0/tests/test_settings.py +105 -0
  42. ollamadiffuser-1.2.2/ollamadiffuser/api/server.py +0 -450
  43. ollamadiffuser-1.2.2/ollamadiffuser/cli/main.py +0 -1309
  44. ollamadiffuser-1.2.2/ollamadiffuser/core/inference/engine.py +0 -1427
  45. ollamadiffuser-1.2.2/ollamadiffuser/core/models/registry.py +0 -384
  46. ollamadiffuser-1.2.2/ollamadiffuser/ui/samples/.DS_Store +0 -0
  47. ollamadiffuser-1.2.2/ollamadiffuser.egg-info/requires.txt +0 -30
  48. {ollamadiffuser-1.2.2 → ollamadiffuser-2.0.0}/LICENSE +0 -0
  49. {ollamadiffuser-1.2.2 → ollamadiffuser-2.0.0}/MANIFEST.in +0 -0
  50. {ollamadiffuser-1.2.2 → ollamadiffuser-2.0.0}/ollamadiffuser/__main__.py +0 -0
  51. {ollamadiffuser-1.2.2 → ollamadiffuser-2.0.0}/ollamadiffuser/api/__init__.py +0 -0
  52. {ollamadiffuser-1.2.2 → ollamadiffuser-2.0.0}/ollamadiffuser/cli/__init__.py +0 -0
  53. {ollamadiffuser-1.2.2 → ollamadiffuser-2.0.0}/ollamadiffuser/cli/commands.py +0 -0
  54. {ollamadiffuser-1.2.2 → ollamadiffuser-2.0.0}/ollamadiffuser/core/__init__.py +0 -0
  55. {ollamadiffuser-1.2.2 → ollamadiffuser-2.0.0}/ollamadiffuser/core/config/__init__.py +0 -0
  56. {ollamadiffuser-1.2.2/ollamadiffuser/core/inference → ollamadiffuser-2.0.0/ollamadiffuser/core/models}/__init__.py +0 -0
  57. {ollamadiffuser-1.2.2 → ollamadiffuser-2.0.0}/ollamadiffuser/core/models/gguf_loader.py +0 -0
  58. {ollamadiffuser-1.2.2 → ollamadiffuser-2.0.0}/ollamadiffuser/core/models/manager.py +0 -0
  59. {ollamadiffuser-1.2.2 → ollamadiffuser-2.0.0}/ollamadiffuser/core/utils/__init__.py +0 -0
  60. {ollamadiffuser-1.2.2 → ollamadiffuser-2.0.0}/ollamadiffuser/core/utils/controlnet_preprocessors.py +0 -0
  61. {ollamadiffuser-1.2.2 → ollamadiffuser-2.0.0}/ollamadiffuser/core/utils/download_utils.py +0 -0
  62. {ollamadiffuser-1.2.2 → ollamadiffuser-2.0.0}/ollamadiffuser/core/utils/lora_manager.py +0 -0
  63. {ollamadiffuser-1.2.2/ollamadiffuser/core/models → ollamadiffuser-2.0.0/ollamadiffuser/mcp}/__init__.py +0 -0
  64. {ollamadiffuser-1.2.2 → ollamadiffuser-2.0.0}/ollamadiffuser/ui/__init__.py +0 -0
  65. {ollamadiffuser-1.2.2 → ollamadiffuser-2.0.0}/ollamadiffuser/ui/samples/canny/geometric_shapes.png +0 -0
  66. {ollamadiffuser-1.2.2 → ollamadiffuser-2.0.0}/ollamadiffuser/ui/samples/canny/house_outline.png +0 -0
  67. {ollamadiffuser-1.2.2 → ollamadiffuser-2.0.0}/ollamadiffuser/ui/samples/canny/portrait_outline.png +0 -0
  68. {ollamadiffuser-1.2.2 → ollamadiffuser-2.0.0}/ollamadiffuser/ui/samples/depth/linear_perspective.png +0 -0
  69. {ollamadiffuser-1.2.2 → ollamadiffuser-2.0.0}/ollamadiffuser/ui/samples/depth/radial_gradient.png +0 -0
  70. {ollamadiffuser-1.2.2 → ollamadiffuser-2.0.0}/ollamadiffuser/ui/samples/depth/sphere_3d.png +0 -0
  71. {ollamadiffuser-1.2.2 → ollamadiffuser-2.0.0}/ollamadiffuser/ui/samples/metadata.json +0 -0
  72. {ollamadiffuser-1.2.2 → ollamadiffuser-2.0.0}/ollamadiffuser/ui/samples/openpose/running_pose.png +0 -0
  73. {ollamadiffuser-1.2.2 → ollamadiffuser-2.0.0}/ollamadiffuser/ui/samples/openpose/sitting_pose.png +0 -0
  74. {ollamadiffuser-1.2.2 → ollamadiffuser-2.0.0}/ollamadiffuser/ui/samples/openpose/standing_pose.png +0 -0
  75. {ollamadiffuser-1.2.2 → ollamadiffuser-2.0.0}/ollamadiffuser/ui/samples/scribble/car_sketch.png +0 -0
  76. {ollamadiffuser-1.2.2 → ollamadiffuser-2.0.0}/ollamadiffuser/ui/samples/scribble/face_sketch.png +0 -0
  77. {ollamadiffuser-1.2.2 → ollamadiffuser-2.0.0}/ollamadiffuser/ui/samples/scribble/tree_sketch.png +0 -0
  78. {ollamadiffuser-1.2.2 → ollamadiffuser-2.0.0}/ollamadiffuser/utils/__init__.py +0 -0
  79. {ollamadiffuser-1.2.2 → ollamadiffuser-2.0.0}/ollamadiffuser.egg-info/dependency_links.txt +0 -0
  80. {ollamadiffuser-1.2.2 → ollamadiffuser-2.0.0}/ollamadiffuser.egg-info/not-zip-safe +0 -0
  81. {ollamadiffuser-1.2.2 → ollamadiffuser-2.0.0}/ollamadiffuser.egg-info/top_level.txt +0 -0
  82. {ollamadiffuser-1.2.2 → ollamadiffuser-2.0.0}/requirements.txt +0 -0
  83. {ollamadiffuser-1.2.2 → ollamadiffuser-2.0.0}/setup.cfg +0 -0
  84. {ollamadiffuser-1.2.2 → ollamadiffuser-2.0.0}/setup.py +0 -0
@@ -5,6 +5,171 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [2.0.0] - 2026-02-04
9
+
10
+ ### 🏗️ Architecture Overhaul
11
+
12
+ #### Strategy Pattern Engine
13
+ - **Refactored InferenceEngine**: Replaced 1400+ line monolithic class with a ~220 line facade delegating to per-model strategy classes
14
+ - **8 Strategy Classes**: `SD15Strategy`, `SDXLStrategy`, `FluxStrategy`, `SD3Strategy`, `ControlNetStrategy`, `VideoStrategy`, `HiDreamStrategy`, `GGUFStrategy`
15
+ - **Abstract Base Class**: `InferenceStrategy` in `core/inference/base.py` with shared loading, LoRA, seed, and error handling logic
16
+ - **Unified Safety Checker**: Replaced 5+ monkey-patch approaches with a single `SAFETY_DISABLED_KWARGS` dict passed to `from_pretrained`
17
+
18
+ #### CLI Modularization
19
+ - **Split CLI**: Broke 1300+ line `cli/main.py` into 5 focused modules (~139 line router)
20
+ - **model_commands.py**: pull, run, list, show, check, rm, ps, load, unload, serve, stop
21
+ - **lora_commands.py**: LoRA pull, load, unload, rm, ps, list, show
22
+ - **registry_commands.py**: Registry list, add, remove, reload, import-config, export, check-gguf
23
+ - **config_commands.py**: Config show, set (models_dir, cache_dir, server settings)
24
+
25
+ #### Duplicate Code Removal
26
+ - **Removed `core/models/registry.py`**: Eliminated duplicate model registry (kept `core/config/model_registry.py`)
27
+ - **Removed dead files**: `constants.py`, `helpers.py` from old engine architecture
28
+
29
+ ### 🚀 New Features
30
+
31
+ #### Image-to-Image Generation
32
+ - **img2img API endpoint**: `POST /api/generate/img2img` with strength control
33
+ - **Inpainting API endpoint**: `POST /api/generate/inpaint` with mask support
34
+ - **SD1.5 img2img/inpainting**: Via `StableDiffusionImg2ImgPipeline` and `StableDiffusionInpaintPipeline`
35
+ - **SDXL img2img/inpainting**: Via `StableDiffusionXLImg2ImgPipeline` and `StableDiffusionXLInpaintPipeline`
36
+ - **Web UI img2img**: New collapsible img2img section with input image preview
37
+
38
+ #### Seed Support
39
+ - **Random seeds by default**: Replaced hardcoded `seed=42` with `random.randint(0, 2**32 - 1)`
40
+ - **Reproducible generation**: Pass explicit `seed` parameter to any generation endpoint
41
+ - **Web UI seed field**: Optional seed input with "Random" placeholder
42
+ - **API seed parameter**: `seed` field in `GenerateRequest` model
43
+
44
+ #### Async API
45
+ - **Non-blocking generation**: All GPU-bound operations wrapped in `asyncio.to_thread()`
46
+ - **Async model loading**: `/api/models/load` and `/api/models/pull` are non-blocking
47
+ - **Web UI async**: Generate and load operations in thread pool
48
+
49
+ ### 🌐 21 New Models
50
+
51
+ #### GenericPipelineStrategy
52
+ - **New strategy class**: Dynamically loads any `diffusers` pipeline class via `model_config.parameters["pipeline_class"]`, enabling new model types without writing new strategy code
53
+
54
+ #### Tier 1: Classic Models (existing strategies)
55
+ - **Stable Diffusion 3.5 Large**: `stabilityai/stable-diffusion-3.5-large` (sd3, 28 steps)
56
+ - **Stable Diffusion 3.5 Large Turbo**: `stabilityai/stable-diffusion-3.5-large-turbo` (sd3, 4 steps, guidance=0.0)
57
+ - **RealVisXL V4**: `SG161222/RealVisXL_V4.0` (sdxl, photorealistic finetune)
58
+ - **DreamShaper**: `Lykon/DreamShaper` (sd15, popular community model)
59
+ - **Realistic Vision V6**: `SG161222/Realistic_Vision_V6.0_B1_noVAE` (sd15, portrait specialist)
60
+ - **SDXL Turbo**: `stabilityai/sdxl-turbo` (sdxl, single-step inference)
61
+
62
+ #### Tier 2: Scheduler Override
63
+ - **SDXL Lightning 4-Step**: `ByteDance/SDXL-Lightning` (sdxl, EulerDiscreteScheduler with trailing timestep spacing)
64
+ - **SDXLStrategy scheduler override**: Reads `scheduler_class` and `scheduler_kwargs` from model parameters to configure custom schedulers
65
+
66
+ #### Tier 3: FLUX Pipeline Variants
67
+ - **FLUX.1 Fill**: `black-forest-labs/FLUX.1-Fill-dev` (FluxFillPipeline, inpainting/outpainting)
68
+ - **FLUX.1 Canny**: `black-forest-labs/FLUX.1-Canny-dev` (FluxControlPipeline, edge control)
69
+ - **FLUX.1 Depth**: `black-forest-labs/FLUX.1-Depth-dev` (FluxControlPipeline, depth control)
70
+ - **FluxStrategy dynamic pipeline**: Reads `pipeline_class` from parameters, defaults to `FluxPipeline` for backward compatibility
71
+
72
+ #### Tier 4: Next-Generation Models (GenericPipelineStrategy)
73
+ - **FLUX.2 Dev**: `black-forest-labs/FLUX.2-dev` (32B params, Flux2Pipeline)
74
+ - **FLUX.2 Klein 4B**: `black-forest-labs/FLUX.2-klein-4B` (4B params, Apache 2.0, Flux2KleinPipeline)
75
+ - **Z-Image Turbo**: `Tongyi-MAI/Z-Image-Turbo` (Alibaba 6B, 8-step turbo, bilingual CN/EN)
76
+ - **SANA 1.5**: `Efficient-Large-Model/SANA1.5_1.6B_1024px_diffusers` (NVIDIA 1.6B, very efficient)
77
+ - **CogView4**: `THUDM/CogView4-6B` (Zhipu AI 6B, GLM-4 encoder, bilingual CN/EN)
78
+ - **Kolors**: `Kwai-Kolors/Kolors-diffusers` (Kuaishou 8.6B, ChatGLM3, bilingual CN/EN)
79
+ - **Hunyuan-DiT**: `Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers` (Tencent 1.5B, dual text encoders)
80
+ - **Lumina 2.0**: `Alpha-VLLM/Lumina-Image-2.0` (2B, unified text+image tokens)
81
+ - **PixArt-Sigma**: `PixArt-alpha/PixArt-Sigma-XL-2-1024-MS` (0.6B, <8GB VRAM, 4K capable)
82
+ - **AuraFlow**: `fal/AuraFlow-v0.3` (6.8B, largest Apache 2.0 text-to-image model)
83
+ - **OmniGen**: `Shitao/OmniGen-v1-diffusers` (BAAI 3.8B, unified generation, no negative prompt)
84
+
85
+ ### 🔌 OpenClaw & MCP Integration
86
+ - **MCP Server**: New `ollamadiffuser mcp` command (or `ollamadiffuser-mcp` entry point) starts a Model Context Protocol server with 4 tools: `generate_image`, `list_models`, `load_model`, `get_status` -- works with OpenClaw, Claude Code, Cursor, and any MCP client
87
+ - **OpenClaw AgentSkill**: `integrations/openclaw/SKILL.md` provides a ready-to-use skill for OpenClaw with full REST API instructions for model management and image generation
88
+ - **Base64 JSON response**: New `response_format=b64_json` option on `POST /api/generate` returns `{"image": "<base64>", "format": "png", "width": w, "height": h}` -- essential for AI agent and messaging platform integration
89
+ - **Optional dependency**: `pip install "ollamadiffuser[mcp]"` or `pip install "ollamadiffuser[openclaw]"` adds MCP support; included in `[full]`
90
+
91
+ ### 🍎 Apple Silicon / Mac Mini Support
92
+ - **`ollamadiffuser recommend` command**: New CLI command that detects hardware (CUDA/MPS/CPU, RAM/VRAM) and recommends models that fit, with `--commercial-only` and `--device` flags
93
+ - **MPS dtype safety**: GenericPipelineStrategy now falls back from bfloat16 to float16 on MPS devices, preventing Metal compatibility issues
94
+ - **GGUF Metal acceleration**: All 11 GGUF models now list MPS in supported_devices (Metal acceleration via `CMAKE_ARGS="-DSD_METAL=ON"`)
95
+ - **Registry MPS updates**: Added MPS support to `cogview4` and `lumina-2` model entries
96
+ - **Smart quick-start**: `recommend` command suggests the best standalone model for your hardware (e.g. `pixart-sigma` for 16GB Mac)
97
+
98
+ ### ⚙️ Configuration Management
99
+ - **`ollamadiffuser config` command**: New CLI command that shows all configuration (paths, server settings)
100
+ - **`ollamadiffuser config set`**: Set custom model storage directory, cache directory, and server settings
101
+ - **Custom paths**: `models_dir` and `cache_dir` can now be overridden and persisted in `config.json`
102
+ - **Registry command visibility**: Made `ollamadiffuser registry` command visible in CLI help output
103
+
104
+ ### 🔒 Security Fixes
105
+ - **Path traversal prevention**: Removed `control_image_path` from `/api/generate` endpoint (use dedicated `/api/generate/controlnet` with file upload instead)
106
+ - **CORS hardening**: Dropped `allow_credentials=True` from CORS middleware
107
+ - **Error detail leakage**: Replaced raw exception messages in HTTP responses with generic error messages, log full details server-side with `exc_info=True`
108
+
109
+ ### 🐛 Bug Fixes (v2.0.0)
110
+ - **HuggingFace Hub path check**: Fixed `Path.exists()` returning False for Hub IDs like `"black-forest-labs/FLUX.1-schnell"` by only checking local paths
111
+ - **Device placement conflict**: Fixed `_move_to_device()` and `enable_model_cpu_offload()` contradicting each other in FluxStrategy, HiDreamStrategy, and VideoStrategy (now mutually exclusive)
112
+ - **Falsy zero evaluation**: Fixed `num_inference_steps=0` being treated as falsy across all 8 strategies (now uses `is not None` check)
113
+ - **SD1.5 silent guidance clamping**: Removed silent `guidance > 7.0` clamp; kept MPS clamp with logging
114
+ - **SD1.5 silent dimension override**: Replaced silent 1024->512 dimension override with logged warning for dimensions > 768
115
+ - **VideoStrategy hardcoded dimensions**: Fixed hardcoded `width=512, height=512` to use user-specified values
116
+ - **Error image truncation**: Added `prompt[:50] + "..."` truncation in `_create_error_image` for long prompts
117
+ - **GGUF duplicate seed logic**: Moved `import random` to module level
118
+ - **Web UI LoRA download**: Fixed `final_name` reference error in `pull_lora_ui` by initializing before try block
119
+ - **Hardcoded seed=42**: Now random by default across all strategies
120
+ - **Safety checker monkey-patches**: Unified into clean `SAFETY_DISABLED_KWARGS`
121
+ - **Missing CLI commands**: Added `serve` and `stop` to `model_commands.py`
122
+ - **Sync API blocking**: All endpoints now properly async
123
+
124
+ ### 🧪 Test Suite
125
+ - **82 tests across 7 modules**: All passing
126
+ - **test_settings.py**: ModelConfig, ServerConfig, Settings save/load
127
+ - **test_model_registry.py**: Default models, get/add/remove, model names, 21 new model validation (types, pipeline classes, scheduler config, hardware requirements, MPS size constraints)
128
+ - **test_engine.py**: Strategy factory (all 9 types including generic), device detection, engine lifecycle, GenericPipelineStrategy (dynamic pipeline loading, missing/invalid pipeline class, CPU offload), base strategy methods, safety kwargs
129
+ - **test_api_server.py**: Health, root, models, generate endpoints via TestClient
130
+ - **test_mps_support.py**: GenericPipelineStrategy MPS dtype fallback (6 tests), registry MPS device assignments (2 tests), recommend command classification and CLI (7 tests)
131
+ - **test_api_base64.py**: Base64 JSON response format (default PNG, b64_json, null format, no-model error)
132
+ - **test_mcp_server.py**: MCP server creation, tool registration, list_models, get_status, load_model, generate_image error handling (8 tests, skip gracefully without mcp package)
133
+
134
+ ### 📦 Dependencies Updated
135
+ - **torch**: `>=2.4.0` (was `>=2.0.0`)
136
+ - **diffusers**: `>=0.34.0` (was `>=0.26.0`)
137
+ - **accelerate**: `>=1.0.0` (was `>=0.20.0`)
138
+ - **transformers**: `>=4.44.0` (was `>=4.30.0`)
139
+ - **numpy**: `>=1.26.0` (was `>=1.24.0`)
140
+ - **Pillow**: `>=10.0.0` (was `>=9.5.0`)
141
+ - **GGUF optional**: Moved `stable-diffusion-cpp-python` and `gguf` to `[gguf]` extra
142
+ - **Dev dependencies**: Added `pytest`, `pytest-cov`, `pytest-asyncio`, `httpx`, `mypy`
143
+
144
+ ### 🌐 Web UI Updates
145
+ - **Version display**: Header shows v2.0.0
146
+ - **Seed field**: Optional seed input for reproducible results
147
+ - **img2img tab**: Collapsible section with strength, steps, guidance, and seed controls
148
+ - **img2img results**: Side-by-side input/output image display
149
+ - **Async operations**: Model loading and generation run in thread pool
150
+
151
+ ### 🐛 Bug Fixes
152
+ - **Hardcoded seed=42**: Now random by default across all strategies
153
+ - **Safety checker monkey-patches**: Unified into clean `SAFETY_DISABLED_KWARGS`
154
+ - **Missing CLI commands**: Added `serve` and `stop` to `model_commands.py`
155
+ - **Sync API blocking**: All endpoints now properly async
156
+
157
+ ### ⚠️ Breaking Changes
158
+ - **Minimum Python**: 3.10+ (was 3.8+)
159
+ - **Dependency versions**: Major bumps to torch, diffusers, accelerate
160
+ - **GGUF install**: Now requires `pip install "ollamadiffuser[gguf]"` instead of separate packages
161
+ - **Internal API**: `InferenceEngine` internals restructured (public API unchanged)
162
+
163
+ ### 🔄 Migration Guide
164
+ For users upgrading from v1.x:
165
+
166
+ 1. **Update dependencies**: `pip install --upgrade ollamadiffuser`
167
+ 2. **GGUF users**: `pip install "ollamadiffuser[gguf]"` (separate install no longer works)
168
+ 3. **API consumers**: No changes needed -- all endpoints remain compatible
169
+ 4. **Python API users**: `engine.generate_image()` API unchanged, now supports `seed`, `image`, `mask_image`, and `strength` parameters
170
+
171
+ ---
172
+
8
173
  ## [1.2.0] - 2025-06-02
9
174
 
10
175
  ### 🚀 Major Features Added