ollamadiffuser 1.1.6__tar.gz → 1.2.1__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.
- ollamadiffuser-1.2.1/CHANGELOG.md +292 -0
- {ollamadiffuser-1.1.6/ollamadiffuser.egg-info → ollamadiffuser-1.2.1}/PKG-INFO +145 -10
- {ollamadiffuser-1.1.6 → ollamadiffuser-1.2.1}/README.md +140 -6
- {ollamadiffuser-1.1.6 → ollamadiffuser-1.2.1}/ollamadiffuser/__init__.py +1 -1
- {ollamadiffuser-1.1.6 → ollamadiffuser-1.2.1}/ollamadiffuser/api/server.py +10 -2
- {ollamadiffuser-1.1.6 → ollamadiffuser-1.2.1}/ollamadiffuser/cli/main.py +366 -28
- ollamadiffuser-1.2.1/ollamadiffuser/core/config/model_registry.py +757 -0
- {ollamadiffuser-1.1.6 → ollamadiffuser-1.2.1}/ollamadiffuser/core/inference/engine.py +334 -4
- ollamadiffuser-1.2.1/ollamadiffuser/core/models/gguf_loader.py +771 -0
- ollamadiffuser-1.2.1/ollamadiffuser/core/models/manager.py +397 -0
- ollamadiffuser-1.2.1/ollamadiffuser/core/models/registry.py +384 -0
- {ollamadiffuser-1.1.6 → ollamadiffuser-1.2.1}/ollamadiffuser/core/utils/download_utils.py +35 -2
- {ollamadiffuser-1.1.6 → ollamadiffuser-1.2.1/ollamadiffuser.egg-info}/PKG-INFO +145 -10
- {ollamadiffuser-1.1.6 → ollamadiffuser-1.2.1}/ollamadiffuser.egg-info/SOURCES.txt +3 -0
- {ollamadiffuser-1.1.6 → ollamadiffuser-1.2.1}/ollamadiffuser.egg-info/requires.txt +4 -4
- {ollamadiffuser-1.1.6 → ollamadiffuser-1.2.1}/pyproject.toml +5 -5
- {ollamadiffuser-1.1.6 → ollamadiffuser-1.2.1}/requirements.txt +7 -1
- {ollamadiffuser-1.1.6 → ollamadiffuser-1.2.1}/setup.py +2 -5
- ollamadiffuser-1.1.6/CHANGELOG.md +0 -141
- ollamadiffuser-1.1.6/ollamadiffuser/core/models/manager.py +0 -570
- {ollamadiffuser-1.1.6 → ollamadiffuser-1.2.1}/LICENSE +0 -0
- {ollamadiffuser-1.1.6 → ollamadiffuser-1.2.1}/MANIFEST.in +0 -0
- {ollamadiffuser-1.1.6 → ollamadiffuser-1.2.1}/ollamadiffuser/__main__.py +0 -0
- {ollamadiffuser-1.1.6 → ollamadiffuser-1.2.1}/ollamadiffuser/api/__init__.py +0 -0
- {ollamadiffuser-1.1.6 → ollamadiffuser-1.2.1}/ollamadiffuser/cli/__init__.py +0 -0
- {ollamadiffuser-1.1.6 → ollamadiffuser-1.2.1}/ollamadiffuser/cli/commands.py +0 -0
- {ollamadiffuser-1.1.6 → ollamadiffuser-1.2.1}/ollamadiffuser/core/__init__.py +0 -0
- {ollamadiffuser-1.1.6 → ollamadiffuser-1.2.1}/ollamadiffuser/core/config/__init__.py +0 -0
- {ollamadiffuser-1.1.6 → ollamadiffuser-1.2.1}/ollamadiffuser/core/config/settings.py +0 -0
- {ollamadiffuser-1.1.6 → ollamadiffuser-1.2.1}/ollamadiffuser/core/inference/__init__.py +0 -0
- {ollamadiffuser-1.1.6 → ollamadiffuser-1.2.1}/ollamadiffuser/core/models/__init__.py +0 -0
- {ollamadiffuser-1.1.6 → ollamadiffuser-1.2.1}/ollamadiffuser/core/utils/__init__.py +0 -0
- {ollamadiffuser-1.1.6 → ollamadiffuser-1.2.1}/ollamadiffuser/core/utils/controlnet_preprocessors.py +0 -0
- {ollamadiffuser-1.1.6 → ollamadiffuser-1.2.1}/ollamadiffuser/core/utils/lora_manager.py +0 -0
- {ollamadiffuser-1.1.6 → ollamadiffuser-1.2.1}/ollamadiffuser/ui/__init__.py +0 -0
- {ollamadiffuser-1.1.6 → ollamadiffuser-1.2.1}/ollamadiffuser/ui/samples/.DS_Store +0 -0
- {ollamadiffuser-1.1.6 → ollamadiffuser-1.2.1}/ollamadiffuser/ui/samples/canny/geometric_shapes.png +0 -0
- {ollamadiffuser-1.1.6 → ollamadiffuser-1.2.1}/ollamadiffuser/ui/samples/canny/house_outline.png +0 -0
- {ollamadiffuser-1.1.6 → ollamadiffuser-1.2.1}/ollamadiffuser/ui/samples/canny/portrait_outline.png +0 -0
- {ollamadiffuser-1.1.6 → ollamadiffuser-1.2.1}/ollamadiffuser/ui/samples/depth/linear_perspective.png +0 -0
- {ollamadiffuser-1.1.6 → ollamadiffuser-1.2.1}/ollamadiffuser/ui/samples/depth/radial_gradient.png +0 -0
- {ollamadiffuser-1.1.6 → ollamadiffuser-1.2.1}/ollamadiffuser/ui/samples/depth/sphere_3d.png +0 -0
- {ollamadiffuser-1.1.6 → ollamadiffuser-1.2.1}/ollamadiffuser/ui/samples/metadata.json +0 -0
- {ollamadiffuser-1.1.6 → ollamadiffuser-1.2.1}/ollamadiffuser/ui/samples/openpose/running_pose.png +0 -0
- {ollamadiffuser-1.1.6 → ollamadiffuser-1.2.1}/ollamadiffuser/ui/samples/openpose/sitting_pose.png +0 -0
- {ollamadiffuser-1.1.6 → ollamadiffuser-1.2.1}/ollamadiffuser/ui/samples/openpose/standing_pose.png +0 -0
- {ollamadiffuser-1.1.6 → ollamadiffuser-1.2.1}/ollamadiffuser/ui/samples/scribble/car_sketch.png +0 -0
- {ollamadiffuser-1.1.6 → ollamadiffuser-1.2.1}/ollamadiffuser/ui/samples/scribble/face_sketch.png +0 -0
- {ollamadiffuser-1.1.6 → ollamadiffuser-1.2.1}/ollamadiffuser/ui/samples/scribble/tree_sketch.png +0 -0
- {ollamadiffuser-1.1.6 → ollamadiffuser-1.2.1}/ollamadiffuser/ui/templates/index.html +0 -0
- {ollamadiffuser-1.1.6 → ollamadiffuser-1.2.1}/ollamadiffuser/ui/web.py +0 -0
- {ollamadiffuser-1.1.6 → ollamadiffuser-1.2.1}/ollamadiffuser/utils/__init__.py +0 -0
- {ollamadiffuser-1.1.6 → ollamadiffuser-1.2.1}/ollamadiffuser.egg-info/dependency_links.txt +0 -0
- {ollamadiffuser-1.1.6 → ollamadiffuser-1.2.1}/ollamadiffuser.egg-info/entry_points.txt +0 -0
- {ollamadiffuser-1.1.6 → ollamadiffuser-1.2.1}/ollamadiffuser.egg-info/not-zip-safe +0 -0
- {ollamadiffuser-1.1.6 → ollamadiffuser-1.2.1}/ollamadiffuser.egg-info/top_level.txt +0 -0
- {ollamadiffuser-1.1.6 → ollamadiffuser-1.2.1}/setup.cfg +0 -0
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [1.2.0] - 2025-06-02
|
|
9
|
+
|
|
10
|
+
### 🚀 Major Features Added
|
|
11
|
+
|
|
12
|
+
#### ⚡ GGUF Model Support
|
|
13
|
+
- **Quantized Models**: Full support for GGUF (GPT-Generated Unified Format) quantized models
|
|
14
|
+
- **Massive VRAM Reduction**: Run FLUX.1-dev with 3GB VRAM instead of 20GB+
|
|
15
|
+
- **7 Quantization Levels**: From q2k (3GB) to f16 (16GB) for different hardware capabilities
|
|
16
|
+
- **Hardware Optimization**: Native CUDA and Metal acceleration support
|
|
17
|
+
- **CPU Fallback**: Automatic CPU inference when VRAM is insufficient
|
|
18
|
+
|
|
19
|
+
#### 🎛️ GGUF Model Variants
|
|
20
|
+
- **flux.1-dev-gguf-q2k**: Ultra-low VRAM (3GB) for testing and low-end hardware
|
|
21
|
+
- **flux.1-dev-gguf-q3ks**: Balanced option (4GB) for mobile GPUs
|
|
22
|
+
- **flux.1-dev-gguf-q4ks**: **Recommended** (6GB) - best quality/performance balance
|
|
23
|
+
- **flux.1-dev-gguf-q5ks**: High quality (8GB) for mid-range GPUs
|
|
24
|
+
- **flux.1-dev-gguf-q6k**: Near-original quality (10GB)
|
|
25
|
+
- **flux.1-dev-gguf-q8**: Minimal quality loss (12GB)
|
|
26
|
+
- **flux.1-dev-gguf-f16**: Full precision (16GB)
|
|
27
|
+
|
|
28
|
+
### 🛠️ Technical Implementation
|
|
29
|
+
|
|
30
|
+
#### GGUF Engine Integration
|
|
31
|
+
- **Backend**: stable-diffusion.cpp with Python bindings integration
|
|
32
|
+
- **Automatic Detection**: Seamless GGUF model recognition and loading
|
|
33
|
+
- **Memory Management**: Intelligent VRAM usage and CPU offloading
|
|
34
|
+
- **Hardware Acceleration**: CMAKE-based CUDA and Metal compilation support
|
|
35
|
+
|
|
36
|
+
#### CLI Enhancements
|
|
37
|
+
- **GGUF Check**: `ollamadiffuser registry check-gguf` command for compatibility verification
|
|
38
|
+
- **Model Pull**: Seamless GGUF model downloading with progress tracking
|
|
39
|
+
- **Status Monitoring**: Real-time GGUF support and model status checking
|
|
40
|
+
|
|
41
|
+
### 🎯 Performance Optimizations
|
|
42
|
+
|
|
43
|
+
#### Generation Parameters
|
|
44
|
+
- **Optimized Settings**: 4-step generation (FLUX-optimized)
|
|
45
|
+
- **CFG Scale**: guidance_scale=1.0 for best FLUX results
|
|
46
|
+
- **Euler Sampler**: Recommended sampler for GGUF models
|
|
47
|
+
- **Hardware Adaptation**: Automatic parameter adjustment based on available VRAM
|
|
48
|
+
|
|
49
|
+
#### Memory Efficiency
|
|
50
|
+
- **Smart Loading**: Load only required model components
|
|
51
|
+
- **Progressive Quantization**: Automatic fallback to lower quantization when needed
|
|
52
|
+
- **Resource Management**: Intelligent GPU memory allocation and cleanup
|
|
53
|
+
|
|
54
|
+
### 📚 Documentation & Guides
|
|
55
|
+
|
|
56
|
+
#### Comprehensive GGUF Guide
|
|
57
|
+
- **GGUF_GUIDE.md**: Complete 160+ line guide with installation, usage, and troubleshooting
|
|
58
|
+
- **Hardware Recommendations**: Specific guidance for different GPU tiers
|
|
59
|
+
- **Performance Comparisons**: Quality vs speed vs VRAM usage tables
|
|
60
|
+
- **Troubleshooting**: Common issues and solutions for GGUF models
|
|
61
|
+
|
|
62
|
+
#### Usage Examples
|
|
63
|
+
- **CLI Workflows**: Step-by-step GGUF model usage examples
|
|
64
|
+
- **Python API**: Code examples for programmatic GGUF model usage
|
|
65
|
+
- **Web UI Integration**: Browser-based GGUF model selection and generation
|
|
66
|
+
|
|
67
|
+
### 🔧 Dependencies & Requirements
|
|
68
|
+
|
|
69
|
+
#### New Dependencies
|
|
70
|
+
- **stable-diffusion-cpp-python**: Core GGUF inference engine
|
|
71
|
+
- **gguf**: Model format handling and validation
|
|
72
|
+
- **Enhanced OpenCV**: Updated to >=4.8.0 for improved compatibility
|
|
73
|
+
|
|
74
|
+
#### Hardware Support
|
|
75
|
+
- **NVIDIA CUDA**: CMAKE_ARGS="-DSD_CUDA=ON" installation
|
|
76
|
+
- **Apple Metal**: CMAKE_ARGS="-DSD_METAL=ON" for M1/M2 Macs
|
|
77
|
+
- **CPU Inference**: Full CPU fallback support for any modern processor
|
|
78
|
+
|
|
79
|
+
### 🎨 User Experience Improvements
|
|
80
|
+
|
|
81
|
+
#### Accessibility
|
|
82
|
+
- **Low-End Hardware**: Enable FLUX.1-dev on 3GB GPUs (previously impossible)
|
|
83
|
+
- **Faster Downloads**: Reduced model sizes from ~24GB to 3-16GB
|
|
84
|
+
- **Quick Testing**: Instant model switching between quantization levels
|
|
85
|
+
|
|
86
|
+
#### Web UI Enhancements
|
|
87
|
+
- **GGUF Model Selection**: Dropdown menu with GGUF model variants
|
|
88
|
+
- **VRAM Monitoring**: Real-time memory usage display
|
|
89
|
+
- **Quality Preview**: Visual quality indicators for each quantization level
|
|
90
|
+
|
|
91
|
+
### 🐛 Bug Fixes & Improvements
|
|
92
|
+
- **Memory Leaks**: Improved GGUF model cleanup and resource management
|
|
93
|
+
- **Error Handling**: Better error messages for GGUF-specific issues
|
|
94
|
+
- **Compatibility**: Enhanced hardware detection and fallback mechanisms
|
|
95
|
+
|
|
96
|
+
### ⚠️ Breaking Changes
|
|
97
|
+
- **Dependency Requirements**: New GGUF dependencies required for full functionality
|
|
98
|
+
- **Model Loading**: GGUF models use different loading mechanisms than regular models
|
|
99
|
+
|
|
100
|
+
### 🔄 Migration Guide
|
|
101
|
+
For users upgrading to v1.2.0:
|
|
102
|
+
|
|
103
|
+
1. **Install GGUF Dependencies**: `pip install stable-diffusion-cpp-python gguf`
|
|
104
|
+
2. **Check Compatibility**: `ollamadiffuser registry check-gguf`
|
|
105
|
+
3. **Download GGUF Model**: `ollamadiffuser pull flux.1-dev-gguf-q4ks`
|
|
106
|
+
4. **Update Hardware Acceleration**: Reinstall with CUDA/Metal support if needed
|
|
107
|
+
|
|
108
|
+
### 📊 Performance Metrics
|
|
109
|
+
- **VRAM Reduction**: Up to 85% reduction (20GB → 3GB)
|
|
110
|
+
- **File Size**: Up to 87% smaller downloads (24GB → 3GB)
|
|
111
|
+
- **Generation Speed**: Comparable or faster due to optimized quantization
|
|
112
|
+
- **Quality Retention**: 90%+ quality retention with q4ks quantization
|
|
113
|
+
|
|
114
|
+
## [1.1.6] - 2025-5-30
|
|
115
|
+
|
|
116
|
+
### 🎨 New Features
|
|
117
|
+
|
|
118
|
+
#### ControlNet Sample Images
|
|
119
|
+
- **New CLI Command**: `ollamadiffuser create-samples` for creating ControlNet demonstration images
|
|
120
|
+
- **Built-in Samples**: Pre-made control images for Canny, Depth, OpenPose, and Scribble controls
|
|
121
|
+
- **Web UI Integration**: Sample images automatically available in the web interface for easy testing
|
|
122
|
+
- **Force Recreation**: `--force` flag to recreate all samples even if they exist
|
|
123
|
+
|
|
124
|
+
#### Installation Helper
|
|
125
|
+
- **New Script**: `install_helper.py` for platform-specific installation guidance
|
|
126
|
+
- **Shell Detection**: Automatically detects user's shell (bash, zsh, fish) and provides correct install syntax
|
|
127
|
+
- **Multiple Installation Options**: Basic, Full, and Development installation commands
|
|
128
|
+
- **Interactive Installation**: Option to install directly from the helper script
|
|
129
|
+
|
|
130
|
+
### 🛠️ Improvements
|
|
131
|
+
|
|
132
|
+
#### CLI Enhancements
|
|
133
|
+
- **Progress Tracking**: Enhanced download progress display with Ollama-style formatting
|
|
134
|
+
- **Better Error Handling**: Improved error messages and graceful failure modes
|
|
135
|
+
- **Warning Fixes**: Resolved various CLI warnings and edge cases
|
|
136
|
+
|
|
137
|
+
#### Web UI Enhancements
|
|
138
|
+
- **Sample Image Gallery**: Built-in ControlNet samples with 3 images per control type
|
|
139
|
+
- **Automatic Sample Creation**: Samples generated automatically when needed
|
|
140
|
+
- **Better UX**: Visual samples make ControlNet testing more intuitive
|
|
141
|
+
|
|
142
|
+
### 🐛 Bug Fixes
|
|
143
|
+
- **Version Inconsistencies**: Fixed version numbering across different components
|
|
144
|
+
- **Installation Issues**: Resolved shell-specific installation syntax problems
|
|
145
|
+
- **CLI Warnings**: Fixed various warning messages and edge cases
|
|
146
|
+
- **Sample Generation**: Improved reliability of sample image creation
|
|
147
|
+
|
|
148
|
+
### 📦 Technical Changes
|
|
149
|
+
- **MANIFEST.in**: Updated to include sample images and static files
|
|
150
|
+
- **Dependencies**: Refined dependency management for better compatibility
|
|
151
|
+
- **Shell Compatibility**: Better support for zsh, fish, and bash shells
|
|
152
|
+
|
|
153
|
+
### 🎯 Sample Images Created
|
|
154
|
+
- **Canny Control**: Geometric shapes, house outline, portrait silhouette (3 samples)
|
|
155
|
+
- **Depth Control**: Depth map variations for different scene types (3 samples)
|
|
156
|
+
- **OpenPose Control**: Human pose variations for different positions (3 samples)
|
|
157
|
+
- **Scribble Control**: Hand-drawn style sketches and outlines (3 samples)
|
|
158
|
+
|
|
159
|
+
## [1.1.0] - 2025-5-29
|
|
160
|
+
|
|
161
|
+
### 🚀 Major Features Added
|
|
162
|
+
|
|
163
|
+
#### ⚡ Lazy Loading Architecture
|
|
164
|
+
- **Instant Startup**: Application now starts immediately without downloading ControlNet models
|
|
165
|
+
- **On-Demand Loading**: ControlNet preprocessors initialize only when actually needed
|
|
166
|
+
- **Performance Boost**: `ollamadiffuser --help` runs in milliseconds instead of 30+ seconds
|
|
167
|
+
- **Memory Efficient**: No unnecessary model downloads for users who don't use ControlNet
|
|
168
|
+
|
|
169
|
+
#### 🎛️ Complete ControlNet Integration
|
|
170
|
+
- **6 ControlNet Models**: SD 1.5 and SDXL variants (canny, depth, openpose, scribble)
|
|
171
|
+
- **10 Control Types**: canny, depth, openpose, hed, mlsd, normal, lineart, lineart_anime, shuffle, scribble
|
|
172
|
+
- **Advanced Preprocessors**: Full controlnet-aux integration with graceful fallbacks
|
|
173
|
+
- **Web UI Integration**: File upload, preprocessing, and side-by-side result display
|
|
174
|
+
- **REST API Support**: Complete API endpoints for ControlNet generation and preprocessing
|
|
175
|
+
|
|
176
|
+
#### 🔄 Enhanced LoRA Management
|
|
177
|
+
- **Web UI Integration**: Download LoRAs directly from Hugging Face in the browser
|
|
178
|
+
- **Alias Support**: Create custom names for your LoRAs
|
|
179
|
+
- **Strength Control**: Adjust LoRA influence with intuitive sliders
|
|
180
|
+
- **Real-time Loading**: Load/unload LoRAs without restarting the application
|
|
181
|
+
|
|
182
|
+
### 🛠️ Technical Improvements
|
|
183
|
+
|
|
184
|
+
#### ControlNet Preprocessor Manager
|
|
185
|
+
- **Lazy Initialization**: `ControlNetPreprocessorManager` with `is_initialized()`, `is_available()`, `initialize()` methods
|
|
186
|
+
- **Automatic Fallback**: Basic OpenCV processors when advanced ones fail
|
|
187
|
+
- **Error Handling**: Robust validation and graceful degradation
|
|
188
|
+
- **Status Tracking**: Real-time initialization and availability status
|
|
189
|
+
|
|
190
|
+
#### Web UI Enhancements
|
|
191
|
+
- **ControlNet Section**: Dedicated controls with status indicators
|
|
192
|
+
- **Initialization Button**: Manual preprocessor initialization for faster processing
|
|
193
|
+
- **File Upload**: Drag-and-drop control image upload with validation
|
|
194
|
+
- **Responsive Design**: Mobile-friendly interface with adaptive layouts
|
|
195
|
+
- **Real-time Status**: Live model, LoRA, and ControlNet status indicators
|
|
196
|
+
|
|
197
|
+
#### API Improvements
|
|
198
|
+
- **New Endpoints**: `/api/controlnet/initialize`, `/api/controlnet/preprocessors`, `/api/controlnet/preprocess`
|
|
199
|
+
- **File Upload Support**: Multipart form data handling for control images
|
|
200
|
+
- **Status Endpoints**: Check ControlNet availability and initialization status
|
|
201
|
+
- **Error Handling**: Comprehensive error responses with helpful messages
|
|
202
|
+
|
|
203
|
+
### 📦 Dependencies Updated
|
|
204
|
+
- **controlnet-aux**: Added `>=0.0.7` for advanced preprocessing capabilities
|
|
205
|
+
- **opencv-python**: Added `>=4.8.0` for basic image processing fallbacks
|
|
206
|
+
- **diffusers**: Updated to `>=0.26.0` for ControlNet compatibility
|
|
207
|
+
|
|
208
|
+
### 🎨 User Experience Improvements
|
|
209
|
+
|
|
210
|
+
#### Startup Performance
|
|
211
|
+
- **Before**: 30+ seconds startup time, 1GB+ automatic downloads
|
|
212
|
+
- **After**: Instant startup, downloads only when needed
|
|
213
|
+
- **User Control**: Choose when to initialize ControlNet preprocessors
|
|
214
|
+
|
|
215
|
+
#### Web UI Experience
|
|
216
|
+
- **Status Indicators**: Clear visual feedback for all system states
|
|
217
|
+
- **Progressive Loading**: Initialize components as needed
|
|
218
|
+
- **Error Messages**: Helpful guidance for common issues
|
|
219
|
+
- **Mobile Support**: Responsive design works on all devices
|
|
220
|
+
|
|
221
|
+
#### CLI Experience
|
|
222
|
+
- **Fast Commands**: All CLI commands run instantly
|
|
223
|
+
- **Lazy Loading**: ControlNet models load only when generating
|
|
224
|
+
- **Status Commands**: Check system state without triggering downloads
|
|
225
|
+
|
|
226
|
+
### 🔧 Configuration Changes
|
|
227
|
+
- **setup.py**: Added ControlNet dependencies
|
|
228
|
+
- **pyproject.toml**: Updated dependency specifications
|
|
229
|
+
- **Model Registry**: Enhanced with ControlNet model definitions
|
|
230
|
+
|
|
231
|
+
### 📚 Documentation Updates
|
|
232
|
+
- **CONTROLNET_GUIDE.md**: Comprehensive 400+ line guide with examples
|
|
233
|
+
- **README.md**: Updated with lazy loading features and ControlNet quick start
|
|
234
|
+
- **API Documentation**: Complete endpoint reference with examples
|
|
235
|
+
|
|
236
|
+
### 🐛 Bug Fixes
|
|
237
|
+
- **Startup Crashes**: Fixed 404 errors from non-existent model repositories
|
|
238
|
+
- **Memory Leaks**: Improved cleanup of ControlNet preprocessors
|
|
239
|
+
- **Device Compatibility**: Better handling of CPU/GPU device switching
|
|
240
|
+
- **Error Handling**: More graceful failure modes with helpful messages
|
|
241
|
+
|
|
242
|
+
### ⚠️ Breaking Changes
|
|
243
|
+
- **Import Behavior**: `controlnet_preprocessors` module no longer auto-initializes
|
|
244
|
+
- **API Changes**: Some ControlNet endpoints require explicit initialization
|
|
245
|
+
|
|
246
|
+
### 🔄 Migration Guide
|
|
247
|
+
For users upgrading from v1.0.x:
|
|
248
|
+
|
|
249
|
+
1. **No Action Required**: Lazy loading is automatic and transparent
|
|
250
|
+
2. **Web UI**: ControlNet preprocessors initialize automatically when uploading images
|
|
251
|
+
3. **API Users**: Call `/api/controlnet/initialize` for faster subsequent processing
|
|
252
|
+
4. **Python API**: Use `controlnet_preprocessor.initialize()` for batch processing
|
|
253
|
+
|
|
254
|
+
### 🎯 Performance Metrics
|
|
255
|
+
- **Startup Time**: Reduced from 30+ seconds to <1 second
|
|
256
|
+
- **Memory Usage**: Reduced baseline memory footprint by ~2GB
|
|
257
|
+
- **First Generation**: Slightly slower due to lazy loading, then normal speed
|
|
258
|
+
- **Subsequent Generations**: Same performance as before
|
|
259
|
+
|
|
260
|
+
## [1.0.0] - 2025-5-28
|
|
261
|
+
|
|
262
|
+
### Added
|
|
263
|
+
- Initial release with core functionality
|
|
264
|
+
- Support for Stable Diffusion 1.5, SDXL, SD3, and FLUX models
|
|
265
|
+
- Basic LoRA support
|
|
266
|
+
- CLI interface
|
|
267
|
+
- REST API server
|
|
268
|
+
- Web UI interface
|
|
269
|
+
- Model management system
|
|
270
|
+
|
|
271
|
+
### Features
|
|
272
|
+
- Model downloading and management
|
|
273
|
+
- Image generation with various parameters
|
|
274
|
+
- Multiple interface options (CLI, API, Web UI)
|
|
275
|
+
- Hardware optimization (CUDA, MPS, CPU)
|
|
276
|
+
- Safety checker bypass for creative freedom
|
|
277
|
+
|
|
278
|
+
---
|
|
279
|
+
|
|
280
|
+
## Development Notes
|
|
281
|
+
|
|
282
|
+
### Version Numbering
|
|
283
|
+
- **Major** (X.0.0): Breaking changes, major feature additions
|
|
284
|
+
- **Minor** (1.X.0): New features, significant improvements
|
|
285
|
+
- **Patch** (1.1.X): Bug fixes, minor improvements
|
|
286
|
+
|
|
287
|
+
### Release Process
|
|
288
|
+
1. Update version in `__init__.py`
|
|
289
|
+
2. Update CHANGELOG.md with new features
|
|
290
|
+
3. Update documentation
|
|
291
|
+
4. Create release tag
|
|
292
|
+
5. Deploy to package repositories
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ollamadiffuser
|
|
3
|
-
Version: 1.1
|
|
3
|
+
Version: 1.2.1
|
|
4
4
|
Summary: 🎨 Local AI Image Generation with Ollama-style CLI for Stable Diffusion, FLUX.1, and LoRA support
|
|
5
5
|
Home-page: https://github.com/ollamadiffuser/ollamadiffuser
|
|
6
6
|
Author: OllamaDiffuser Team
|
|
@@ -52,15 +52,16 @@ Requires-Dist: psutil>=5.9.0
|
|
|
52
52
|
Requires-Dist: jinja2>=3.0.0
|
|
53
53
|
Requires-Dist: peft>=0.10.0
|
|
54
54
|
Requires-Dist: numpy>=1.21.0
|
|
55
|
+
Requires-Dist: controlnet-aux>=0.0.7
|
|
56
|
+
Requires-Dist: opencv-python>=4.8.0
|
|
57
|
+
Requires-Dist: stable-diffusion-cpp-python>=0.1.0
|
|
58
|
+
Requires-Dist: gguf>=0.1.0
|
|
55
59
|
Provides-Extra: dev
|
|
56
60
|
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
57
61
|
Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
|
|
58
62
|
Requires-Dist: black>=23.0.0; extra == "dev"
|
|
59
63
|
Requires-Dist: isort>=5.12.0; extra == "dev"
|
|
60
64
|
Requires-Dist: flake8>=6.0.0; extra == "dev"
|
|
61
|
-
Provides-Extra: full
|
|
62
|
-
Requires-Dist: controlnet-aux>=0.0.7; extra == "full"
|
|
63
|
-
Requires-Dist: opencv-python>=4.8.0; extra == "full"
|
|
64
65
|
Dynamic: author
|
|
65
66
|
Dynamic: home-page
|
|
66
67
|
Dynamic: license-file
|
|
@@ -81,11 +82,69 @@ Dynamic: requires-python
|
|
|
81
82
|
|
|
82
83
|
---
|
|
83
84
|
|
|
85
|
+
## 🔑 Hugging Face Authentication
|
|
86
|
+
|
|
87
|
+
**Do you need a Hugging Face token?** It depends on which models you want to use!
|
|
88
|
+
|
|
89
|
+
### 🟢 Models that DON'T require a token:
|
|
90
|
+
- **FLUX.1-schnell** - Apache 2.0 license, ready to use ✅
|
|
91
|
+
- **Stable Diffusion 1.5** - Basic model, no authentication needed ✅
|
|
92
|
+
- **Most ControlNet models** - Generally public access ✅
|
|
93
|
+
|
|
94
|
+
### 🟡 Models that DO require a token:
|
|
95
|
+
- **FLUX.1-dev** - Requires HF token and license agreement ⚠️
|
|
96
|
+
- **Stable Diffusion 3.5** - Requires HF token and license agreement ⚠️
|
|
97
|
+
- **Some premium LoRAs** - Gated models from Hugging Face ⚠️
|
|
98
|
+
|
|
99
|
+
### 🚀 Quick Setup
|
|
100
|
+
|
|
101
|
+
**For basic usage** (no token needed):
|
|
102
|
+
```bash
|
|
103
|
+
# These work immediately without any setup:
|
|
104
|
+
ollamadiffuser pull flux.1-schnell
|
|
105
|
+
ollamadiffuser pull stable-diffusion-1.5
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
**For advanced models** (token required):
|
|
109
|
+
```bash
|
|
110
|
+
# 1. Set your token
|
|
111
|
+
export HF_TOKEN=your_token_here
|
|
112
|
+
|
|
113
|
+
# 2. Now you can access gated models
|
|
114
|
+
ollamadiffuser pull flux.1-dev
|
|
115
|
+
ollamadiffuser pull stable-diffusion-3.5-medium
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### 🔧 How to get a Hugging Face token:
|
|
119
|
+
|
|
120
|
+
1. **Create account**: Visit [huggingface.co](https://huggingface.co) and sign up
|
|
121
|
+
2. **Generate token**: Go to Settings → Access Tokens → Create new token
|
|
122
|
+
3. **Accept licenses**: Visit the model pages and accept license agreements:
|
|
123
|
+
- [FLUX.1-dev](https://huggingface.co/black-forest-labs/FLUX.1-dev)
|
|
124
|
+
- [Stable Diffusion 3.5](https://huggingface.co/stabilityai/stable-diffusion-3.5-medium)
|
|
125
|
+
4. **Set environment variable**:
|
|
126
|
+
```bash
|
|
127
|
+
# Temporary (current session)
|
|
128
|
+
export HF_TOKEN=your_token_here
|
|
129
|
+
|
|
130
|
+
# Permanent (add to ~/.bashrc or ~/.zshrc)
|
|
131
|
+
echo 'export HF_TOKEN=your_token_here' >> ~/.bashrc
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### 💡 Pro Tips:
|
|
135
|
+
- **Start simple**: Begin with FLUX.1-schnell (no token required, commercial use OK)
|
|
136
|
+
- **Token scope**: Use "read" permissions for downloading models
|
|
137
|
+
- **Privacy**: Your token stays local - never shared with OllamaDiffuser servers
|
|
138
|
+
- **Troubleshooting**: If downloads fail, verify your token and model access permissions
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
84
142
|
## ✨ Features
|
|
85
143
|
|
|
86
144
|
- **🚀 Fast Startup**: Instant application launch with lazy loading architecture
|
|
87
145
|
- **🎛️ ControlNet Support**: Precise image generation control with 10+ control types
|
|
88
146
|
- **🔄 LoRA Integration**: Dynamic LoRA loading and management
|
|
147
|
+
- **📦 GGUF Support**: Memory-efficient quantized models (3GB VRAM minimum!)
|
|
89
148
|
- **🌐 Multiple Interfaces**: CLI, Python API, Web UI, and REST API
|
|
90
149
|
- **📦 Model Management**: Easy installation and switching between models
|
|
91
150
|
- **⚡ Performance Optimized**: Memory-efficient with GPU acceleration
|
|
@@ -109,6 +168,18 @@ curl -X POST http://localhost:8000/api/generate \
|
|
|
109
168
|
--output image.png
|
|
110
169
|
```
|
|
111
170
|
|
|
171
|
+
### GGUF Quick Start (Low VRAM)
|
|
172
|
+
```bash
|
|
173
|
+
# For systems with limited VRAM (3GB+)
|
|
174
|
+
pip install ollamadiffuser stable-diffusion-cpp-python gguf
|
|
175
|
+
|
|
176
|
+
# Download memory-efficient GGUF model
|
|
177
|
+
ollamadiffuser pull flux.1-dev-gguf-q4ks
|
|
178
|
+
|
|
179
|
+
# Generate with reduced memory usage
|
|
180
|
+
ollamadiffuser run flux.1-dev-gguf-q4ks
|
|
181
|
+
```
|
|
182
|
+
|
|
112
183
|
### Option 2: Development Installation
|
|
113
184
|
```bash
|
|
114
185
|
# Clone the repository
|
|
@@ -162,12 +233,26 @@ curl -X POST http://localhost:8000/api/generate/controlnet \
|
|
|
162
233
|
|
|
163
234
|
Choose from a variety of state-of-the-art image generation models:
|
|
164
235
|
|
|
165
|
-
| Model | License | Quality | Speed | Commercial Use |
|
|
166
|
-
|
|
167
|
-
| **FLUX.1-schnell** | Apache 2.0 | High | **4 steps** (12x faster) | ✅ Commercial OK |
|
|
168
|
-
| **FLUX.1-dev** | Non-commercial | High | 50 steps | ❌ Non-commercial |
|
|
169
|
-
| **
|
|
170
|
-
| **Stable Diffusion
|
|
236
|
+
| Model | License | Quality | Speed | Commercial Use | VRAM |
|
|
237
|
+
|-------|---------|---------|-------|----------------|------|
|
|
238
|
+
| **FLUX.1-schnell** | Apache 2.0 | High | **4 steps** (12x faster) | ✅ Commercial OK | 20GB+ |
|
|
239
|
+
| **FLUX.1-dev** | Non-commercial | High | 50 steps | ❌ Non-commercial | 20GB+ |
|
|
240
|
+
| **FLUX.1-dev-gguf** | Non-commercial | High | 4 steps | ❌ Non-commercial | **3-16GB** |
|
|
241
|
+
| **Stable Diffusion 3.5** | CreativeML | Medium | 28 steps | ⚠️ Check License | 12GB+ |
|
|
242
|
+
| **Stable Diffusion 1.5** | CreativeML | Fast | Lightweight | ⚠️ Check License | 6GB+ |
|
|
243
|
+
|
|
244
|
+
### 💾 GGUF Models - Reduced Memory Requirements
|
|
245
|
+
|
|
246
|
+
**NEW**: GGUF quantized models enable running FLUX.1-dev on budget hardware!
|
|
247
|
+
|
|
248
|
+
| GGUF Variant | VRAM | Quality | Best For |
|
|
249
|
+
|--------------|------|---------|----------|
|
|
250
|
+
| `flux.1-dev-gguf-q4ks` | 6GB | ⭐⭐⭐⭐ | **Recommended** - RTX 3060/4060 |
|
|
251
|
+
| `flux.1-dev-gguf-q3ks` | 4GB | ⭐⭐⭐ | Mobile GPUs, GTX 1660 Ti |
|
|
252
|
+
| `flux.1-dev-gguf-q2k` | 3GB | ⭐⭐ | Entry-level hardware |
|
|
253
|
+
| `flux.1-dev-gguf-q6k` | 10GB | ⭐⭐⭐⭐⭐ | RTX 3080/4070+ |
|
|
254
|
+
|
|
255
|
+
📖 **[Complete GGUF Guide](GGUF_GUIDE.md)** - Hardware recommendations, installation, and optimization tips
|
|
171
256
|
|
|
172
257
|
### Why Choose FLUX.1-schnell?
|
|
173
258
|
- **Apache 2.0 license** - Perfect for commercial use
|
|
@@ -305,6 +390,11 @@ else:
|
|
|
305
390
|
- **Stable Diffusion 3**: Latest architecture
|
|
306
391
|
- **FLUX.1**: State-of-the-art quality
|
|
307
392
|
|
|
393
|
+
### GGUF Quantized Models
|
|
394
|
+
- **FLUX.1-dev GGUF**: 7 quantization levels (3GB-16GB VRAM)
|
|
395
|
+
- **Memory Efficient**: Run high-quality models on budget hardware
|
|
396
|
+
- **Same API**: Works seamlessly with existing commands
|
|
397
|
+
|
|
308
398
|
### ControlNet Models
|
|
309
399
|
- **SD 1.5 ControlNet**: 4 control types (canny, depth, openpose, scribble)
|
|
310
400
|
- **SDXL ControlNet**: 2 control types (canny, depth)
|
|
@@ -338,6 +428,19 @@ image = engine.generate_image(
|
|
|
338
428
|
)
|
|
339
429
|
```
|
|
340
430
|
|
|
431
|
+
### GGUF Model Usage
|
|
432
|
+
```bash
|
|
433
|
+
# Check GGUF support
|
|
434
|
+
ollamadiffuser registry check-gguf
|
|
435
|
+
|
|
436
|
+
# Download GGUF model for your hardware
|
|
437
|
+
ollamadiffuser pull flux.1-dev-gguf-q4ks # 6GB VRAM
|
|
438
|
+
ollamadiffuser pull flux.1-dev-gguf-q3ks # 4GB VRAM
|
|
439
|
+
|
|
440
|
+
# Use with optimized settings
|
|
441
|
+
ollamadiffuser run flux.1-dev-gguf-q4ks
|
|
442
|
+
```
|
|
443
|
+
|
|
341
444
|
### Batch Processing
|
|
342
445
|
```python
|
|
343
446
|
from ollamadiffuser.core.utils.controlnet_preprocessors import controlnet_preprocessor
|
|
@@ -375,6 +478,7 @@ with open("control.jpg", "rb") as f:
|
|
|
375
478
|
|
|
376
479
|
## 📚 Documentation & Guides
|
|
377
480
|
|
|
481
|
+
- **[GGUF Models Guide](GGUF_GUIDE.md)**: Complete guide to memory-efficient GGUF models
|
|
378
482
|
- **[ControlNet Guide](CONTROLNET_GUIDE.md)**: Comprehensive ControlNet usage and examples
|
|
379
483
|
- **[Website Documentation](https://www.ollamadiffuser.com/)**: Complete tutorials and guides
|
|
380
484
|
|
|
@@ -386,10 +490,17 @@ with open("control.jpg", "rb") as f:
|
|
|
386
490
|
- **Python**: 3.8+
|
|
387
491
|
|
|
388
492
|
### Recommended Hardware
|
|
493
|
+
|
|
494
|
+
#### For Regular Models
|
|
389
495
|
- **GPU**: 8GB+ VRAM (NVIDIA/AMD)
|
|
390
496
|
- **RAM**: 16GB+ system RAM
|
|
391
497
|
- **Storage**: SSD with 50GB+ free space
|
|
392
498
|
|
|
499
|
+
#### For GGUF Models (Memory Efficient)
|
|
500
|
+
- **GPU**: 3GB+ VRAM (or CPU only)
|
|
501
|
+
- **RAM**: 8GB+ system RAM (16GB+ for CPU inference)
|
|
502
|
+
- **Storage**: SSD with 20GB+ free space
|
|
503
|
+
|
|
393
504
|
### Supported Platforms
|
|
394
505
|
- **CUDA**: NVIDIA GPUs (recommended)
|
|
395
506
|
- **MPS**: Apple Silicon (M1/M2/M3)
|
|
@@ -420,6 +531,18 @@ pip install "ollamadiffuser[full]"
|
|
|
420
531
|
pip install 'ollamadiffuser[full]'
|
|
421
532
|
```
|
|
422
533
|
|
|
534
|
+
#### GGUF Support Issues
|
|
535
|
+
```bash
|
|
536
|
+
# Install GGUF dependencies
|
|
537
|
+
pip install stable-diffusion-cpp-python gguf
|
|
538
|
+
|
|
539
|
+
# Check GGUF support
|
|
540
|
+
ollamadiffuser registry check-gguf
|
|
541
|
+
|
|
542
|
+
# See full GGUF troubleshooting guide
|
|
543
|
+
# Read GGUF_GUIDE.md for detailed troubleshooting
|
|
544
|
+
```
|
|
545
|
+
|
|
423
546
|
#### Complete Dependency Check
|
|
424
547
|
```bash
|
|
425
548
|
# Run comprehensive system diagnostics
|
|
@@ -474,6 +597,10 @@ curl -X POST http://localhost:8000/api/controlnet/initialize
|
|
|
474
597
|
|
|
475
598
|
#### Memory Issues
|
|
476
599
|
```bash
|
|
600
|
+
# Use GGUF models for lower memory usage
|
|
601
|
+
ollamadiffuser pull flux.1-dev-gguf-q4ks # 6GB VRAM
|
|
602
|
+
ollamadiffuser pull flux.1-dev-gguf-q3ks # 4GB VRAM
|
|
603
|
+
|
|
477
604
|
# Use smaller image sizes via API
|
|
478
605
|
curl -X POST http://localhost:8000/api/generate \
|
|
479
606
|
-H "Content-Type: application/json" \
|
|
@@ -492,12 +619,18 @@ curl -X POST http://localhost:8000/api/generate \
|
|
|
492
619
|
# If you encounter OpenCV issues on Apple Silicon
|
|
493
620
|
pip uninstall opencv-python
|
|
494
621
|
pip install opencv-python-headless>=4.8.0
|
|
622
|
+
|
|
623
|
+
# For GGUF Metal acceleration
|
|
624
|
+
CMAKE_ARGS="-DSD_METAL=ON" pip install stable-diffusion-cpp-python
|
|
495
625
|
```
|
|
496
626
|
|
|
497
627
|
#### Windows
|
|
498
628
|
```bash
|
|
499
629
|
# If you encounter build errors
|
|
500
630
|
pip install --only-binary=all opencv-python>=4.8.0
|
|
631
|
+
|
|
632
|
+
# For GGUF CUDA acceleration
|
|
633
|
+
CMAKE_ARGS="-DSD_CUDA=ON" pip install stable-diffusion-cpp-python
|
|
501
634
|
```
|
|
502
635
|
|
|
503
636
|
#### Linux
|
|
@@ -540,6 +673,8 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
|
|
|
540
673
|
## 🙏 Acknowledgments
|
|
541
674
|
|
|
542
675
|
- **Stability AI**: For Stable Diffusion models
|
|
676
|
+
- **Black Forest Labs**: For FLUX.1 models
|
|
677
|
+
- **city96**: For FLUX.1-dev GGUF quantizations
|
|
543
678
|
- **Hugging Face**: For model hosting and diffusers library
|
|
544
679
|
- **ControlNet Team**: For ControlNet architecture
|
|
545
680
|
- **Community**: For feedback and contributions
|