Add comments

This commit is contained in:
Lucas Sköld
2024-05-10 03:11:58 +02:00
parent 34cb9faa57
commit c034c4eaff
2 changed files with 3 additions and 5 deletions
+1 -4
View File
@@ -63,13 +63,10 @@ class CustomSchedulers:
raise ValueError(f"No scheduler found with the name {name}")
def export_scheduler_settings_to_js(self):
# Go up two directories from this script
# Go settings directory
base_path = os.path.dirname(os.path.dirname(os.path.dirname(__file__)))
# Specify the target directory within 'web/settings'
target_dir = os.path.join(base_path, 'web', 'settings')
# Ensure this directory exists
os.makedirs(target_dir, exist_ok=True)
# Define the full file path for the JavaScript file
filepath = os.path.join(target_dir, 'scheduler_settings.js')
# Initialize the JavaScript content with default settings
+2 -1
View File
@@ -1,8 +1,9 @@
import torch
# Necessary map for it to work with simple sampler
settings = {
"name": "sigmoid",
"settings": {
"settings": { # name: [type, default value, min val, max val, snap to, round] Note: this is only for floats, most inputs are different.
"sigma_max_sig": ["FLOAT", 25.0, 0.0, 5000.0, 0.01, False],
"sigma_min_sig": ["FLOAT", 0.0, 0.0, 5000.0, 0.01, False],
"steepness": ["FLOAT", 3.5, 0.0, 10.0, 0.01, False],