-
Notifications
You must be signed in to change notification settings - Fork 26.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scheduler selection in main UI #15333
Conversation
OMG, finally, hahah! Much better this way - thank you @AUTOMATIC1111! 😊 |
On the topic of scheduler selection, the Restart sampler in sd_samplers_extra.py currently forces Karras via the get_sigmas_karras function; I have tested with exponential/polyexponential and can confirm it has no issue with either. |
you forgot hires samples |
UPD: Fixed, see PR below Trying to use the "X/Y/Z plot" results in failure. On the dev branch works fine.
Console logsvenv "D:\AI\SD\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.11 (tags/v3.10.11:7d4cc5a, Apr 5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)]
Version: v1.8.0-238-g31306ce6
Commit hash: 31306ce6721e6f1ae323da64767da91897b3a1c2
Launching Web UI with arguments: --xformers --opt-sdp-attention --opt-channelslast --medvram --port 7860 --listen --ckpt-dir D:\AI\Data\SD\models\Stable-diffusion --vae-dir D:\AI\Data\SD\models\VAE --embeddings-dir D:\AI\Data\SD\embeddings --textual-inversion-templates-dir D:\AI\Data\SD\textual_inversion_templates --clip-models-path D:\AI\Data\SD\models\CLIP --gfpgan-models-path D:\AI\Data\SD\models\GFPGAN --codeformer-models-path D:\AI\Data\SD\models\Codeformer --esrgan-models-path D:\AI\Data\SD\models\ESRGAN --bsrgan-models-path D:\AI\Data\SD\models\BSRGAN --realesrgan-models-path D:\AI\Data\SD\models\RealESRGAN --ldsr-models-path D:\AI\Data\SD\models\LDSR --lora-dir D:\AI\Data\SD\models\Lora --hypernetwork-dir D:\AI\Data\SD\models\hypernetworks --scunet-models-path D:\AI\Data\SD\models\ScuNET --swinir-models-path D:\AI\Data\SD\models\SwinIR --localizations-dir D:\AI\Data\SD\localizations --styles-file D:\AI\Data\SD\styles.csv --disable-extra-extensions
*** "--disable-extra-extensions" arg was used, will only load built-in extensions ***
Loading weights [14953e03f0] from D:\AI\Data\SD\models\Stable-diffusion\SDXL⚡\lightningbloomxl_v10.safetensors
Running on local URL: http://0.0.0.0:7860
Creating model from config: D:\AI\SD\stable-diffusion-webui\repositories\generative-models\configs\inference\sd_xl_base.yaml
To create a public link, set `share=True` in `launch()`.
Startup time: 18.0s (prepare environment: 3.4s, import torch: 4.4s, import gradio: 1.0s, setup paths: 2.2s, initialize shared: 0.8s, other imports: 0.5s, load scripts: 0.9s, reload hypernetworks: 0.2s, create ui: 0.4s, gradio launch: 4.2s).
Loading VAE weights from user metadata: D:\AI\Data\SD\models\VAE\sdxl_vae.safetensors
Applying attention optimization: xformers... done.
Model loaded in 13.6s (calculate hash: 0.2s, load weights from disk: 0.5s, create model: 0.6s, apply weights to model: 2.1s, apply channels_last: 0.2s, apply fp8: 7.3s, load VAE: 0.6s, load textual inversion embeddings: 0.3s, calculate empty prompt: 1.8s).
X/Y/Z plot will create 2 images on 1 2x1 grid. (Total steps to process: 8)
generating image for xyz plot: AttributeError
Traceback (most recent call last):
File "D:\AI\SD\stable-diffusion-webui\modules\processing.py", line 784, in process_images
opts.set(k, v, is_api=True, run_callbacks=False)
File "D:\AI\SD\stable-diffusion-webui\modules\options.py", line 151, in set
option = self.data_labels[key]
KeyError: 'k_sched_type'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\AI\SD\stable-diffusion-webui\scripts\xyz_grid.py", line 723, in cell
res = process_images(pc)
File "D:\AI\SD\stable-diffusion-webui\modules\processing.py", line 802, in process_images
setattr(opts, k, v)
File "D:\AI\SD\stable-diffusion-webui\modules\options.py", line 102, in __setattr__
if info.do_not_save:
AttributeError: 'NoneType' object has no attribute 'do_not_save'
*** Error completing request
*** Arguments: ('task(8p6hou7rvuah98z)', <gradio.routes.Request object at 0x000001B9B668D630>, 'a girl sitting on a throne, head tilt, white hair, black tight dress, white fur trim, red fire behind, realistic, colorful', '', [], 1, 1, 1, 832, 1216, False, 0.2, 2, '4x-UltraSharp', 0, 0, 0, 'Use same checkpoint', 'Use same sampler', '', '', [], 3, 4, 'DPM++ SDE', 'SGM Uniform', 3168277607, False, -1, 0, 0, 0, False, 'CodeFormer', 0, False, 'second pass', False, '', 0.8, False, False, 'positive', 'comma', 20, False, False, 'start', '', 17, '', ['exponential', 'sgm_uniform'], 0, '', [], 0, '', [], True, False, False, False, False, False, False, 20, False) {}
Traceback (most recent call last):
File "D:\AI\SD\stable-diffusion-webui\modules\call_queue.py", line 57, in f
res = list(func(*args, **kwargs))
File "D:\AI\SD\stable-diffusion-webui\modules\call_queue.py", line 36, in f
res = func(*args, **kwargs)
File "D:\AI\SD\stable-diffusion-webui\modules\txt2img.py", line 105, in txt2img
processed = modules.scripts.scripts_txt2img.run(p, *p.script_args)
File "D:\AI\SD\stable-diffusion-webui\modules\scripts.py", line 768, in run
processed = script.run(p, *script_args)
File "D:\AI\SD\stable-diffusion-webui\scripts\xyz_grid.py", line 764, in run
processed = draw_xyz_grid(
File "D:\AI\SD\stable-diffusion-webui\scripts\xyz_grid.py", line 352, in draw_xyz_grid
process_cell(x, y, z, ix, iy, iz)
File "D:\AI\SD\stable-diffusion-webui\scripts\xyz_grid.py", line 296, in process_cell
processed: Processed = cell(x, y, z, ix, iy, iz)
File "D:\AI\SD\stable-diffusion-webui\scripts\xyz_grid.py", line 747, in cell
grid_infotext[subgrid_index] = processing.create_infotext(pc, pc.all_prompts, pc.all_seeds, pc.all_subseeds)
File "D:\AI\SD\stable-diffusion-webui\modules\processing.py", line 728, in create_infotext
"Seed": p.all_seeds[0] if use_main_prompt else all_seeds[index],
TypeError: 'NoneType' object is not subscriptable
--- |
Fix for "Scheduler selection" #15333
its too dev++ completed, can any one help us how can we get the old sampler back, in a work way easy way |
can we get the old sampler back ??? |
I never use schedulers like karras, exponential, etc because of their airbrush effect, especially on human skin. |
I've been using the traditional approach of integrating the scheduler and sampler by implementing it myself. Can you please provide a unified UI like the old one? |
@undeadx1 Samplers and schedulers are two different things. The "traditional approach" presenting them as single entity was a design mistake. New samplers and new schedulers are being developed each year. If you have let's say 10 samplers and 5 schedulers then instead of having 2 short lists you'd have to maintain list of all 50 combinations. I understand some people were used to that, and that some software was built around how it previously worked, but this "traditional approach" should be just left in the history. |
…art 1 Re-applied AUTOMATIC1111/stable-diffusion-webui#15333 into Forge, to use any scheduler with any sampler. Also implemented CFG++ from AUTOMATIC1111/stable-diffusion-webui#16035 as a scheduler instead of a sampler. Ported SD Turbo and Variance Preserving from https://github.com/lllyasviel/stable-diffusion-webui-forge/blob/main/ldm_patched/contrib/external_custom_sampler.py
How do you change this value in API calls? |
you change the |
- Fix "X/Y/Z plot" not working with "Schedule type" - Fix "Schedule type" not being saved to "params.txt"
Description
Schedule type
infotext field (this was previously a setting)Automatic
chooses the default appropriate scheduler for the samplerI tested selecting different samplers and schedulers, changing rho and other params in settings, infotext pasting from old and current versions, all seems to work. Comments welcome.
Screenshots/videos: