Skip to content

Commit 66e65b4

Browse files
committed
resume fixes, added tpe and cma params
- better tracking for optuna runs - forge extras update to latest - requirements hotfixes - gamma and forensic scorer replaced by pca and hybridnoise, both recommended on solid background images to optimize towards less noise - suppressing unnecessary debug mode prints
1 parent a480083 commit 66e65b4

File tree

9 files changed

+193
-526
lines changed

9 files changed

+193
-526
lines changed

conf/config.tmpl.yaml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,6 @@ optimizer:
134134
batch_size: 1 # Number of images to generate for EACH payload per iteration.
135135
save_imgs: True # Save all generated images to the run's 'imgs' folder.
136136
img_average_type: arithmetic # How to average scores within a batch: 'arithmetic', 'geometric', or 'quadratic'.
137-
background_check: # Settings for the background blackness scorer.
138-
enabled: False # Set to true to enable the check. This scorer is useful for character-focused models.
139-
payloads: [] # List of payload names (e.g., ["noob1", "noob2"]) to apply this specific check to.
140137

141138
# --- Generator/aiohttp Settings ---
142139
generator_concurrency_limit: 10 # Max number of simultaneous API requests to the WebUI.
@@ -171,4 +168,19 @@ visualizations:
171168
convergence_plot: True # Generate a plot showing the score over iterations.
172169
# scatter_plot: False # (Not implemented)
173170
# unet_diagram: False # (Deprecated)
174-
# heatmap: False # (Not implemented)
171+
# heatmap: False # (Not implemented)
172+
173+
# --- Scorer-Specific Settings ---
174+
# PCAScorer settings
175+
pcascorer_component: 1
176+
pcascorer_mode: 'projection'
177+
pcascorer_input_type: 'color'
178+
pcascorer_linearize: False
179+
pcascorer_invert: False
180+
pcascorer_enhancement: 'equalize'
181+
pcascorer_gamma: 1.0
182+
183+
# HybridNoiseScorer settings
184+
hybridnoise_kernel_size: 3
185+
hybridnoise_noise_threshold: 20.0
186+
hybridnoise_color_tolerance: 30

requirements.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ hydra-core # Core Hydra library for configuration
1111
sd-mecha # Use the latest compatible version, or specify one explicitly like >=0.1.0 if known
1212

1313
# --- Optimization Libraries ---
14-
bayesian-optimization # Keep if you want to retain BayesOpt as an option
14+
bayesian-optimization==1.5.1 # Keep if you want to retain BayesOpt as an option
1515
optuna # ADDED: For Optuna optimizer support
1616
optuna-dashboard # Realtime dashboard for optuna
1717
optuna-fast-fanova # Recommended Optuna dependency
@@ -50,6 +50,10 @@ tensordict # Appears related to PyTorch/distributed? Review if nee
5050
timm # Image models library, possibly used by a scorer? Review if needed.
5151
fairscale # Distributed training/sharding library. Unlikely needed unless doing specific advanced things.
5252
# pynput # REMOVED: Was for old hotkey system, we'll use asyncio/other methods
53+
# needs descriptions
54+
geoopt
55+
rembg
56+
aesthetic-predictor-v2-5
5357

5458
# --- Testing ---
5559
# pytest # Keep if you have tests or plan to add them

sd_optim.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@
1919
format='%(asctime)s [%(levelname)s] %(name)s: %(message)s',
2020
datefmt='%Y-%m-%d %H:%M:%S'
2121
)
22+
23+
# Suppress noisy third-party loggers - ADD THIS HERE
24+
logging.getLogger('choreographer').setLevel(logging.WARNING)
25+
logging.getLogger('kaleido').setLevel(logging.WARNING)
26+
logging.getLogger('plotly').setLevel(logging.WARNING) # Just in case
27+
2228
# Use a logger specific to this main script
2329
logger = logging.getLogger(__name__) # Hydra often configures this further
2430

sd_optim/generator.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@ async def generate_swarm(
114114
try:
115115
# <<< USE provided session for getting Swarm session ID >>>
116116
session_id = await self.get_swarm_session(session) # Pass session here
117-
if not session_id: logger.error("Failed to get Swarm session ID."); return
117+
if not session_id:
118+
logger.error("Failed to get Swarm session ID."); return
118119

119120
payload["session_id"] = session_id
120121

0 commit comments

Comments
 (0)