Giter VIP home page Giter VIP logo

text2image-gui's Introduction

NMKD Stable Diffusion GUI

Somewhat modular text2image GUI, initially just for Stable Diffusion.

Relies on a slightly customized fork of the InvokeAI Stable Diffusion code: Code Repo

Main Guide:
System Requirements
Features and How to Use Them
Hotkeys (Main Window)

Additional Guides:
AMD GPU Support
Inpainting

System Requirements

OS: Windows 10/11 64-bit

Minimum:

  • GPU: Nvidia GPU with 4 GB VRAM, Maxwell Architecture (2014) or newer

    • Alternatively, with limited feature support: Any DirectML-capable GPU with 8 GB of VRAM
  • RAM: 8 GB RAM (Note: Pagefile must be enabled as swapping will occur with only 8 GB!)

  • Disk: 10 GB (another free 5 GB for temporary files recommended)

Recommended:

  • GPU: Nvidia GPU with 8 GB VRAM, Pascal Architecture (2016) or newer
  • RAM: 16 GB RAM
  • Disk: 12 GB on SSD (another free 5 GB for temporary files recommended)

Features and How to Use Them

Prompt Input

  • Multiple prompts at once: Enter each prompt on a new line (newline-separated). Word wrapping does not count towards this.

  • Negative Prompt: Put words or phrases into this box to tell the AI to exclude those things when generating images.

    • Alternatively, you can also put the negative prompt into the regular prompt box by wrapping it in [brackets].
  • Emphasis: Use + after a word/phrase to make it more impactful, or - to do the opposite. You can also use to increase the effect. Wrap your phrase in parentheses if you want to apply it to more than one word.

    • Each plus/minus applies a multiplier of 1.1. So two +++ would be 1.1^3 = 1.331, and so on.
    • You can also type the strength manually after parentheses, e.g. a (huge)1.33 dog instead of a huge+++ dog
    • Syntax Examples: a green++ tree, a (big green)+ tree with orange- leaves (in the woods)++
  • Wildcards: Fill in words or phrases from a list into the prompt.

    • Inline: photo of a ~car,tree,dog~.
    • From File: photo of a ~objects for loading texts from objects.txt in your Wildcards folder in the SD GUI root folder.
    • Order: Use ~ for random/shuffled, ~~ for unchanged order, or ~~~ for sorted (A-Z) mode.

Additional Inputs

  • Textual Inversion Embeddings: Select a prompt embedding and add it to your prompt (Path can be set in Settings).
  • LoRA Files: (Hidden if no files are in the folder) Select LoRA models and set the weight.
  • Base Image: Load an initialization image that will be used together with your text prompt ("img2img"), or for inpainting
    • Loading multiple images means that each image will be processed separately.

Stable Diffusion Settings

  • Steps: More steps can increase detail, but only to a certain extent. Depending on the sampler, 15-50 is a good range.

    • Has a linear performance impact: Doubling the step count means each image takes twice as long to generate.
  • Prompt Guidance (CFG Scale): Lower values are closer to the raw output of the AI, higher values try to respect your prompt more accurately.

    • Use low values if you are happy with the AI's representation of your prompt. Use higher values if not - but going too high will degrade quality.
    • No performance impact, no matter the value.
  • Seed: Starting value for the image generation. Allows you to create the exact same image again by using the same seed.

    • When using the same seed, the image will only be identical if you also use the same sampler and resolution (and other settings).
    • Lock Seed Option: Disable incrementing the seed by 1 for each image. Only useful in combination with wildcards.
  • Resolution: Adjust image size. Only values that are divisible by 64 are possible. Sizes above 512x512 can lead to repeated patterns.

    • Higher resolution images require more VRAM and are slower to generate.
    • High-Resolution Fix: Enable this to avoid getting repeated patterns at high resolutions (~768px+).
  • Sampler: Changes the way images are sampled. DPM++ 2M Karras is the default because it's fast and tends to look good even with 10-20 steps.

  • Generate Seamless Images: Generates seamless/tileable images, very useful for making game textures or repeating backgrounds.

  • Generate Symmetric Images: Generates images that are mirrored on one axis.

Image Viewer

  • Review current images: Use the scroll wheel while hovering over the image to go to the previous/next image.
  • Slideshow: The image viewer always shows the newest generated image if you haven't manually changed it in the last 3 seconds.
  • Context Menu: Right-click into the image area to show more options.
  • Pop-Up Viewer: Click into the image area to open the current image in a floating window.
    • Use the mouse wheel to change the window's size (zoom), right-click for more options, double-click to toggle fullscreen.

Settings Button (Top Bar)

Note: Some options might be hidden depending on the selected implementation.

  • Image Generation Implementation: Choose the AI implementation that's used for image generation.

    • Stable Diffusion - InvokeAI: Supports the most features, but struggles with 4 GB or less VRAM, requires an Nvidia GPU
    • Stable Diffusion - ONNX: Lacks some features and is relatively slow, but can utilize AMD GPUs (any DirectML capable card)
    • InstructPix2Pix - For instruction-based image editing. Requires an Nvidia GPU
  • Use Full Precision: Use FP32 instead of FP16 math, which requires more VRAM but can fix certain compatibility issues.*

  • Unload Model After Each Generation: Completely unload Stable Diffusion after images are generated.*

  • Stable Diffusion Model File: Select the model file to use for image generation.

    • Included models are located in Models/Checkpoints. You can add external folder paths by clicking on "Folders...".
  • Stable Diffusion VAE: Select external VAE (Variational Autoencoder) model. VAEs can improve image quality.*

    • Default path is Models/VAEs. You can add external folder paths by clicking on "Folders...".
  • Textual Inversion Embeddings Folder: Select folder where embeddings (usually .pt files) are loaded from.

  • LoRA Models Folder: Select folder where LoRA models (.safetensors files) are loaded from.

  • Cache Models in RAM: When enabled, models are offloaded into RAM when switching to a new one. This makes it very fast to switch back, but takes up 2GB+ per cached model.

  • Skip Final CLIP Layers (CLIP Skip): Can improve quality on certain models.

  • CUDA Device: Allows your to specify the GPU to run the AI on, or set it to run on the CPU (very slow).*

  • Image Output Folder: Set the folder where your generated images will be saved.

  • Output Subfolder Options:

    • Subfolder Per Prompt: Save images in a subfolder for each prompt. Negative prompt is excluded from the folder name.
    • Ignore Wildcards: Use wildcard name (as in prompt input) instead of the replaced text in file/folder names.
    • Subfolder Per Session: Save images in a subfolder for each session (every time the program is started).
  • Information to Include in Filename: Specify which information should be included in the filename.

  • Favorites Folder: Specify your favorites folder, where your favorite images will be copied to (right-click image viewer or use Ctrl+D)

  • Image Save Mode: Choose whether you want to delete or keep generated images by default.

  • When Running Multiple Prompts, Use Same Starting Seed for All of Them: If enabled, the seed resets to the starting value for every new prompt. If disabled, the seed will be incremented by 1 after each iteration, being sequential until all prompts/iterations have been generated.

  • When Post-Processing Is Enabled, Also Save Un-Processed Image: When enabled, both the "raw" and the post-processed image will be saved.

  • Automatically Set Generation Resolution After Loading an Initialization Image: Automatically sets the image generation to match your image.

  • Retain Aspect Ratio of Initialization Image (If It Needs Resizing): Use padding (black borders) instead of stretching, in case the init image resolution does not match the image generation resolution.

  • Advanced Mode: Increases the limits of the sliders in the main window. Not very useful most of the time unless you really need those high values.

  • Notify When Image Generation Has Finished: Play a sound, show a notification, or do both if image generation finishes in background.

Logs Button (Top Bar)

  • Open Logs Folder: Opens the log folder of the current session. The application deletes older logs on every startup.
  • <logname>.txt: Open the log file or copy the text.

Installation Manager & Updater Button (Top Bar)

  • Manage Installation: Allows you to check if your installation is valid and can repair/reset it.
    • Installation Status: Shows which modules are installed (checkboxes are not interactive and only indicate if a module is installed correctly!).
    • Re-Install Python Dependencies: Re-installs the Stable Diffusion code from its repository and re-installs all required python packages.
    • Re-Install Upscalers: (Re-)Installs upscaling files (RealESRGAN, GFPGAN, CodeFormer, including model files).
    • (Re-)Install: Installs everything. Skips already installed components.
    • Uninstall: Removes everything except for Conda which is included and needed for a re-installation.
  • Install Updates: Allows you to update to a new version or re-install the current one.

Developer Tools Button (Top Bar)

  • Open Stable Diffusion CLI: Use Stable Diffusion in command-line interface.
  • Open CMD in Python Environment: Opens a CMD window with the built-in python environment activated.
  • Merge Models: Allows you to merge/blend two models. The percentage numbers represent their respective weight.
  • Prune Models: Allows you to reduce the size of models by removing data that's not needed for image generation.
  • Convert Models: Allows you to convert model weights between Pytorch (ckpt/pt), Diffusers, Diffusers ONNX, and SafeTensors formats.
  • View Log In Realtime: Opens a separate window that shows all log output, including messages that are not shown in the normal log box.

Post-Processing Button (Top Bar)

  • Upscaling: Set RealESRGAN upscaling factor.
  • Face Restoration: Enable GFPGAN or CodeFormer for face restoration.

Training Button (Top Bar)

Bottom Bar Buttons

  • Generate: Start AI image generation (or cancel if it's already running).
  • Prompt Queue Button: Right-click to add the current settings to the queue, or left-click to manage the queued entries.
  • Prompt History Button: View recent prompts, load them into the main window, search or clear history, or disable it.
  • Image Deletion Button: Delete either the image that is being viewed currently, or all images from the current batch.
  • Open Folder Button: Opens the (root) image output folder.
  • Left/Right Buttons: Show the previous or next image from the current batch.

Hotkeys (Main Window)

  • CTRL+G: Run Image Generation (or Cancel if already running)
  • CTRL+M: Show Model Quick Switcher (Once it's open, use ESC to Cancel or Enter to confirm)
  • CTRL+Shift+M: Show VAE Quick Switcher
  • CTRL+PLUS: Toggle Prompt Textbox Size
  • CTRL+Shift+PLUS: Toggle Negative Prompt Textbox Size
  • CTLR+DEL: Delete currently viewed image
  • CTRL+SHIFT+DEL: Delete all generated images (of the current batch)
  • CTRL+O: Open currently viewed image
  • CTRL+SHIFT+O: Show current image in its folder
  • CTRL+C: Copy currently viewed image to clipboard
  • CTRL+D: Copy currently viewed image to favorites
  • CTRL+V: Paste image (If clipboard contains a bitmap)
  • CTRL+Q: Quit
  • CTRL+Scroll: Change textbox font size (only works while the textbox is being used)
  • F1: Open Help (Currently links to GitHub Readme)
  • F12: Open Settings
  • ESC: Remove focus from currently focused GUI element (e.g. get out of the prompt textbox)

text2image-gui's People

Contributors

adamnorberg avatar arecsu avatar dymil avatar n00mkrad avatar xliee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

text2image-gui's Issues

Error while load model

I tried to compile the code locally. I installed mambaforge and correctly installed the Python environment and stable diffusion code, and I was able to generate the image correctly using the Dream.py CLI, however, in the GUI, after clicking the Generate button, the Output shows:

Loading Stable Diffusion with model "stable-diffusion-1.4"...
Exception thrown: 'System.ComponentModel.Win32Exception' in System.dll
ExportLoop START
Exception thrown: 'System.ArgumentException' in mscorlib.dll
Exception thrown: 'System.ArgumentException' in mscorlib.dll
Exception thrown: 'System.ArgumentException' in mscorlib.dll
Exception thrown: 'System.ArgumentException' in mscorlib.dll
Exception thrown: 'System.ArgumentException' in mscorlib.dll
Exception thrown: 'System.ArgumentException' in mscorlib.dll
Exception thrown: 'System.ArgumentException' in mscorlib.dll
Exception thrown: 'System.ArgumentException' in mscorlib.dll
[infinite Repeat]
......

Looking forward to the reply!

List of Suggestions for improvement to NMKD

Suggestions for improvement to NMKD

  1. Display a photo album that will allow you to select individual photos from the album. Shows as a full image or small as part of the album, also add a function to move the image through arrows key of the keyboard left and right to navigate the photos. also give an option for the user to delete photos from the album which will also be deleted from the disc itself.
  2. A button on the main screen to automatically save or not save images that are created.
  3. Option to not save prompt history
  4. The prompt window position will be down and the info window will be up. (More comfortable in general and gives more space for writing prompts\multi prompts)
  5. Setting the amount of number images for creation with a slider (more convenient)
    6 keyboard shortcuts to generate/cancel
  6. Shortcuts to add or remove from the queue + option to edit settings from the queue )
  7. Option to enlarge the UI on the entire screen. (with bigger text for all the UI) - Maybe the user will decide which is the best measurement for him (Everyone and their preferences)
  8. Images for embedding will be automatically added in the condition of the UNCROP state (This means that all the "W" "H" will be automatically adjusted to the picture frame (without cutting from the picture or stretching it)
  9. Zoom in&out of the image with the help of the mouse wheel when mode 0 is the base original dimensions of the original image (without leaving the frame of the image out. 0 = original frame) - within the original frame of the original image
  10. Possibility to save PRESETS in advance and use them when needed as Automatic 1111 did.

Ok, that's all for tonight... Hope someone reads this and takes it seriously. There are good suggestions here to make.

God bless you all and have a great day and night love you!!!:)❤❤❤

key error: state_dict

Got "key error: state_dict" with about a half of the models that I've downloaded.

Inpainting: Mask Maintaining Color Data?

InvokeAI describes a very specific implementation of masking required to retain color data and properly match underlying colors. Right now, I'm getting a "cut-and-paste" effect without color or pixel value data when I inpaint using NMKD GUI. Two questions:

  1. Is the mask being applied & passed as transparency alpha channel?
  2. Alternatively, are the -I and -M switches being passed to the model?

Source:
https://github.com/invoke-ai/InvokeAI/blob/main/docs/features/INPAINTING.md

v1.9.0 prompt history copies Windows decimal delimeter causing CFG "5" to be used (also happens on v1.8.*)

Another bug I found. I run NMKD on my PC, Windows 10 Spanish language and regional settings. Spanish decimal delimiter is commas (,) which is used when copying multiple CFG values from prompt history. The long syntax is always used when copying from history, so the short syntax "10 > 12.5 : 0.5" (= "10, 10.5, 11, 11.5, 12, 12.5") will work correctly, however it is not copied from history, instead forcing the syntax "10, 10, 5, 11, 11, 5, 12, 12, 5", which in turn causes the halves not to work, instead using the not-decimal part first and then the CFG value "5" in a second image generation. This means the previous syntax does "10 twice, 5 once, 11 twice, 5 once, 12 twice, 5 once", which is not the expected behaviour. I guess people on the internet still don't notice Europe exists...

Upscaler not working

since 1.8.x upscaler is not working. I got this

01-04-2023 03:53:09] [general] HasSdUpscalers - Has ESRGAN: True - Has GFPGAN: True - Has Codeformer: True
[01-04-2023 03:53:09] [general] SetState(PostProcessing)
[01-04-2023 03:53:09] [general] InvokeAI !fix: Upscale
[01-04-2023 03:53:09] [general] => !fix "T:/Mis Documentos/Mis imágenes/Espejo/Sacar/-01-An_almost_cosmic_entity_made_up_of_an_infinite_number_of_small_sparks_with_a_human_shape_but_no_facial_features_creating_its_own_universe_emitting_a_slightly-1907725680-scale9.00-k_dpmpp_2-sd-v1-5-emaonly.png" -U 4 1
[01-04-2023 03:53:14] [sd] invoke> >> fixing T:/Mis Documentos/Mis imágenes/Espejo/Sacar/-01-An_almost_cosmic_entity_made_up_of_an_infinite_number_of_small_sparks_with_a_human_shape_but_no_facial_features_creating_its_own_universe_emitting_a_slightly-1907725680-scale9.00-k_dpmpp_2-sd-v1-5-emaonly.png
[01-04-2023 03:53:14] [sd] >> Real-ESRGAN Upscaling seed:0 : scale:4x
[01-04-2023 03:53:14] [sd] Tile 1/4
[01-04-2023 03:53:14] [sd] Tile 2/4
[01-04-2023 03:53:14] [sd] Tile 3/4
[01-04-2023 03:53:14] [sd] Tile 4/4
[01-04-2023 03:53:14] [sd] Outputs:
[01-04-2023 03:53:14] [sd] [80] T:/IA/SD-GUI/Data/sessions/2023-01-04-00-37-42/out-01-An_almost_cosmic_entity_made_up_of_an_infinite_number_of_small_sparks_with_a_human_shape_but_no_facial_features_creating_its_own_universe_emitting_a_slightly-1907725680-scale9.upscale-01.png: !fix T:/Mis Documentos/Mis imágenes/Espejo/Sacar/-01-An_almost_cosmic_entity_made_up_of_an_infinite_number_of_small_sparks_with_a_human_shape_but_no_facial_features_creating_its_own_universe_emitting_a_slightly-1907725680-scale9.00-k_dpmpp_2-sd-v1-5-emaonly.png -s 50 -S 0 -W 512 -H 512 -C 7.5 -A k_lms -U 4.0 1.0
[01-04-2023 03:53:14] [general] Failed to save post-processed image: No se puede encontrar una parte de la ruta de acceso.
[01-04-2023 03:53:14] [general] From 'T:/IA/SD-GUI/Data/sessions/2023-01-04-00-37-42/out-01-An_almost_cosmic_entity_made_up_of_an_infinite_number_of_small_sparks_with_a_human_shape_but_no_facial_features_creating_its_own_universe_emitting_a_slightly-1907725680-scale9.upscale-01.png' to 'T:/Mis Documentos/Mis imágenes/Espejo/Sacar/-01-An_almost_cosmic_entity_made_up_of_an_infinite_number_of_small_sparks_with_a_human_shape_but_no_facial_features_creating_its_own_universe_emitting_a_slightly-1907725680-scale9.00-k_dpmpp_2-sd-v1-5-emaonly.fix.png' - Trace:
en System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
en System.IO.File.InternalMove(String sourceFileName, String destFileName, Boolean checkHost)
en StableDiffusionGui.Main.TtiUtils.ExportPostprocessedImage(String sourceImgPath, String processedImgPath)
[01-04-2023 03:53:14] [general] SetState(Standby)

number of rendered images is off in subsequent renders

The problem I reported yesterday on Discord with the beta version of 1.4.0 is the same with the finished version from itch.io: I render a first sequence of three images and get three images, a subsequent render with the same seed and with or without changed parameters only renders two images out of three. See attached image, left top you can see that three images are set, bottom right you can see that only 2/2 were rendered.

In addition to that: the "render" button stays at "cancel" and the progress rotator thingie on the top keeps rotating. Did not happen with the earlier version (1.3.x)

image

Support for Image Variations

I'd like to request support for the image variations model of Stable Diffusion. Here is more info -
https://twitter.com/buntworthy/status/1566744186153484288
https://github.com/justinpinkney/stable-diffusion#image-variations

This would be very useful for creating large datasets based from a single image. For context, I've been creating 10,000 images in Stable Diffusion and then using it to train StyleGAN2. Here are some recent examples of my work -
https://www.jasonfletcher.info/vjloops/

CUDA graphic card not recognized

Hi, I have a 2013 NVIDIA QUADRO K1100M card in my Dell Precision M3800 with last updated driver 427.60. It comes with 2 GB GDDR5 at 2800 MHz, but it doesn't show as a CUDA device in the GUI.

Does somebody know if this card is compatible?

Thank you.

Failed to install upscalers...

Error info:
Failed to install upscalers: Path 'D:\SD-GUI-1.6.0\Data\gfpgan' doesn't point at a valid Git repository or workdir.

Error with using Radeon RX6600M

This error says that i have not enough memory, but i dont know why but he trying to use D disk instead C(D is about 500mb) and i think its because of it, how can i change folder? i didnt saw in settings where is D chosen

How do I download previous versions?

Good day.

Unfortunately version 1.8.0 does not work, at the end of the generation of the video card error.
There were no such problems with 1.7.2!
On itch I can not download the previous version.

Why don't you publish releases on github?
Where can I download version 1.7.2?

Where is Dreambooth?

Hello! First of all — thank you for the GUI!

I've got the 1.6 version (changelog said that there is dreambooth training), but didn't find the dreambooth functionality. Is it supposed to be in GUI?

Enhancement Request

It would be awesome if this application allowed us to img2img batch-process an entire folder of images.

Downloads for past versions

I'd like a link to download past versions of the tool.

As mentioned in the memory thread I have a bug related to the . and , locale issue which makes my GPU report out of memory even when there is memory available. Unfortunately my windows is Single Language Edition and I can't change the display language to fix that, and I know 1.7.1 worked for me without being forced into low memory mode and 512x512 at most because of the bug in the 1.8.X series.

For further clarification, I found an older version of the 'folder' on my backups, I can confirm 1.7.1 works and lets me generate 960x960px images with high res fix, upscales and face restoration in a measly 1660ti-MaxQ without using low memory mode and losing negative prompts. Problem being I get reports regarding paths it used before the past failed windows update broke my PC which don't exist anymore, and not reading one 'vae.pt' file 1.8.1 reads)

So I'd like to be able to download 1.7.1 for reinstalling clean and try 1.7.2 to see if it still works, if you have the files available.

Dreambooth on 1.7 change

How come unlike the previous release 512x512 is essentially locked in and forced? Is that Dreambooth's limitation? I've used larger 1:1 images on your 1.6 release and the results were good.

also

2 quick questions

  • what scheduler does it use?
  • what is the actual learning rate when the slider is at "1"?

Thank You

Installation not finishing correctly

Hi!

I have a fresh clone of this repository but I am not able to finish installation. It does not install Conda at all (no "mb" folder) and installing the upscalers also does not finish. The last problem can be solved cloning the upscalers repo (https://github.com/TencentARC/GFPGAN) directly. This way the installation gets recognized.

GPU detection

It detects the GPU but it says it only has 22 gb and it is a rtx4090 zota gaming airo, so it does not allows to train.

This GPU is 24gb

Negative Prompt not Shown or saved into Image Metadata

I downloaded yesterday the new 1.7.0 version of the GUI.
I tried generating a few images using the Negative Prompt.

It doesn't appear on the left side above the image (the normal prompt appears in green as intended).
It also wasn't saved in the Image metadata (the normal prompt was).

I tried to generate two images with the same prompts and seeds but one with the Negative Prompt and the other without. They came out exactly identical.

My main question for this bug is: is the Negative Prompt used but not shown or it is not used at all?

BTW fantastic work with this GUI! Keep it up!

v1.4 bug: Cancelling a diffusion crashes the entire application

"Unhandled execute has occurred in your application. ... The system cannot find the file specified."

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
at StableDiffusionGui.Os.OsUtils.SendCtrlC(Int32 pid)
at StableDiffusionGui.Main.TtiUtils.SoftCancelDreamPy()
at StableDiffusionGui.Main.TextToImage.Cancel(String reason, Boolean showMsgBox)
at StableDiffusionGui.MainForm.runBtn_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.8.9075.0 built by: NET481REL1LAST_C
CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll

StableDiffusionGui
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Users/Administrator/Downloads/SD-GUI-1.4.0/StableDiffusionGui.exe

System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.8.9075.0 built by: NET481REL1LAST_C
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll

System
Assembly Version: 4.0.0.0
Win32 Version: 4.8.9065.0 built by: NET481REL1LAST_C
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll

System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.8.9032.0 built by: NET481REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll

Newtonsoft.Json
Assembly Version: 13.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Users/Administrator/Downloads/SD-GUI-1.4.0/StableDiffusionGui.exe

System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.8.9065.0 built by: NET481REL1LAST_C
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll

System.Numerics
Assembly Version: 4.0.0.0
Win32 Version: 4.8.9032.0 built by: NET481REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll

System.Runtime.Serialization
Assembly Version: 4.0.0.0
Win32 Version: 4.8.9032.0 built by: NET481REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Serialization/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Serialization.dll

System.Data
Assembly Version: 4.0.0.0
Win32 Version: 4.8.9065.0 built by: NET481REL1LAST_C
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_64/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll

System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.8.9032.0 built by: NET481REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll

System.Management
Assembly Version: 4.0.0.0
Win32 Version: 4.8.9032.0 built by: NET481REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Management/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Management.dll

System.Management.Automation
Assembly Version: 3.0.0.0
Win32 Version: 10.0.22621.436
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Management.Automation/v4.0_3.0.0.0__31bf3856ad364e35/System.Management.Automation.dll

System.Configuration
Assembly Version: 4.0.0.0
Win32 Version: 4.8.9032.0 built by: NET481REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll

HTAlt.WinForms
Assembly Version: 0.1.7.4
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Users/Administrator/Downloads/SD-GUI-1.4.0/StableDiffusionGui.exe

CircularProgressBar
Assembly Version: 2.8.0.16
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Users/Administrator/Downloads/SD-GUI-1.4.0/StableDiffusionGui.exe

WinFormAnimation
Assembly Version: 1.6.0.4
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Users/Administrator/Downloads/SD-GUI-1.4.0/StableDiffusionGui.exe

WindowsBase
Assembly Version: 4.0.0.0
Win32 Version: 4.8.9065.0 built by: NET481REL1LAST_C
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/WindowsBase/v4.0_4.0.0.0__31bf3856ad364e35/WindowsBase.dll

HTAlt.Standart
Assembly Version: 0.1.7.3
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Users/Administrator/Downloads/SD-GUI-1.4.0/StableDiffusionGui.exe

netstandard
Assembly Version: 2.0.0.0
Win32 Version: 4.8.9032.0
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/netstandard/v4.0_2.0.0.0__cc7b13ffcd2ddd51/netstandard.dll

Accessibility
Assembly Version: 4.0.0.0
Win32 Version: 4.8.9032.0 built by: NET481REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll

Microsoft.WindowsAPICodePack.Shell
Assembly Version: 1.1.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Users/Administrator/Downloads/SD-GUI-1.4.0/StableDiffusionGui.exe

Microsoft.WindowsAPICodePack
Assembly Version: 1.1.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Users/Administrator/Downloads/SD-GUI-1.4.0/StableDiffusionGui.exe

MetadataExtractor
Assembly Version: 2.7.2.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Users/Administrator/Downloads/SD-GUI-1.4.0/StableDiffusionGui.exe

PresentationCore
Assembly Version: 4.0.0.0
Win32 Version: 4.8.9065.0 built by: NET481REL1LAST_C
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_64/PresentationCore/v4.0_4.0.0.0__31bf3856ad364e35/PresentationCore.dll

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

Unhandled Thread Exception

Please help me!

Unhandled Thread Exception!

Object reference not set to an instance of an object.

Stack Trace:
at StableDiffusionGui.Ui.MainForm.FormControls.get_IsUsingInpaintingModel()
at StableDiffusionGui.Ui.MainForm.FormControls.RefreshUiAfterSettingsChanged()
at StableDiffusionGui.Ui.MainForm.FormControls.UpdateInitImgAndEmbeddingUi()
at System.Windows.Forms.ComboBox.OnSelectedIndexChanged(EventArgs e)
at System.Windows.Forms.ComboBox.set_SelectedIndex(Int32 value)
at StableDiffusionGui.ExtensionMethods.FillFromEnum[TEnum](ComboBox comboBox, Dictionary2 stringMap, Int32 defaultIndex, List1 exclusionList)
at StableDiffusionGui.Ui.MainForm.FormControls.InitializeControls()
at StableDiffusionGui.MainForm.d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at StableDiffusionGui.MainForm.<MainForm_Shown>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

I also cannot turn off the program without the task manager, it gives this message:

Unhandled Thread Exception!

Access to the path 'C:\Program Files\SD-GUI-1.8.1\Data\config.json' is denied.

Stack Trace:
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)
at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
at System.IO.File.InternalWriteAllText(String path, String contents, Encoding encoding, Boolean checkHost)
at StableDiffusionGui.Io.ConfigParser.SaveGuiElement(NumericUpDown upDown, String key, StringMode stringMode)
at StableDiffusionGui.Ui.MainForm.FormControls.Save()
at StableDiffusionGui.MainForm.MainForm_FormClosing(Object sender, FormClosingEventArgs e)
at System.Windows.Forms.Form.OnFormClosing(FormClosingEventArgs e)
at System.Windows.Forms.Form.WmClose(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Can anyone tell me what I should do? Thanks in advance.

Can't paste prompt (Ctrl+V)

When I try to paste prompt into the text field nothing is pasted. This issue is only with NKMD application.

dreambooth reguralization images option?

Hi, just tried out program and it worked awesome. Only one that was working with novelAi-base right of the bat.

But i noticed that there is no option for choosing a reguralization images folder. As i understand, training becomes a lot more stable with those images added.

Then i checked the code and as far as i can see you already have the call towards reg-images (dreambooth.py, line 60), you just copy the trainingImages 2 times.
Is there a reason why you do that and not give 2 path choices in the ui, one for training images and one for reguralization Images?

                Process db = OsUtils.NewProcess(!showCmd);
                db.StartInfo.Arguments = $"{OsUtils.GetCmdArg()} cd /D {Paths.GetDataPath().Wrap()} && {TtiUtils.GetEnvVarsSd()} && call activate.bat {Constants.Dirs.Conda}/envs/{Constants.Dirs.SdEnv} && python {Constants.Dirs.RepoSd}/db/main.py -t " +
                    $"--base {configPath.Wrap(true)} " +
                    $"--actual_resume {baseModel.FullName.Wrap(true)} " +
                    $"--name {name.Wrap()} " +
                    $"--logdir {logDir.Wrap(true)} " +
                    $"--gpus {cudaId}, " + // TODO: Support multi-GPU
                    $"--data_root {trainImgDir.FullName.Wrap(true)} " +
->>>                    $"--reg_data_root {trainImgDir.FullName.Wrap(true)} " + (THIS path here is what i mean)
                    $"--class_word {className.Wrap()} " +

Cancel button works differently

I recently upgraded from v1.3.1 to v1.4.0.
In 1.3.1, I would set the image count arbitrarily high (usually 1000) for a prompt so that it would generate images until I hit cancel.
In 1.4.0, hitting cancel, changing the prompt/settings, and hitting generate again will simply generate conintue to generate the previous prompt until it hits that arbitrarily high image count, and the only way I can seem to fix it is by closing and reopening the GUI, as even adding the new prompt to the queue and then clicking "Generate Queued Prompts" continues to generate the old prompt.

Being unable to change your prompt until every image is generated is highly inconveniencing, so I'm assuming this must be a bug.

add .editorconfig for collab work

Hi, for easier collaboration, may I suggest an editorconfig file to maintain your coding style?

You can generate from your Visual Studio settings, or take an inference version:

# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

# Don't use tabs for indentation.
[*]
indent_style = space
# (Please don't specify an indent_size here; that has too many unintended consequences.)

# Code files
[*.{cs,csx,vb,vbx}]
indent_size = 4
insert_final_newline = true
charset = utf-8-bom

# XML project files
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}]
indent_size = 4

# XML config files
[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}]
indent_size = 2

# JSON files
[*.json]
indent_size = 2

# Powershell files
[*.ps1]
indent_size = 2

# Shell script files
[*.sh]
end_of_line = lf
indent_size = 2

# Dotnet code style settings:
[*.{cs,vb}]

# IDE0055: Fix formatting
dotnet_diagnostic.IDE0055.severity = warning

# Sort using and Import directives with System.* appearing first
dotnet_sort_system_directives_first = true
dotnet_separate_import_directive_groups = false
# Avoid "this." and "Me." if not necessary
dotnet_style_qualification_for_field = false:silent
dotnet_style_qualification_for_property = false:silent
dotnet_style_qualification_for_method = false:silent
dotnet_style_qualification_for_event = false:silent

# Use language keywords instead of framework type names for type references
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
dotnet_style_predefined_type_for_member_access = true:suggestion

# Suggest more modern language features when available
dotnet_style_object_initializer = true:suggestion
dotnet_style_collection_initializer = true:suggestion
dotnet_style_coalesce_expression = true:suggestion
dotnet_style_null_propagation = true:suggestion
dotnet_style_explicit_tuple_names = true:suggestion

# Non-private static fields are PascalCase
dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.symbols = non_private_static_fields
dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.style = non_private_static_field_style

dotnet_naming_symbols.non_private_static_fields.applicable_kinds = field
dotnet_naming_symbols.non_private_static_fields.applicable_accessibilities = public, protected, internal, protected_internal, private_protected
dotnet_naming_symbols.non_private_static_fields.required_modifiers = static

dotnet_naming_style.non_private_static_field_style.capitalization = pascal_case

# Non-private readonly fields are PascalCase
dotnet_naming_rule.non_private_readonly_fields_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.non_private_readonly_fields_should_be_pascal_case.symbols = non_private_readonly_fields
dotnet_naming_rule.non_private_readonly_fields_should_be_pascal_case.style = non_private_static_field_style

dotnet_naming_symbols.non_private_readonly_fields.applicable_kinds = field
dotnet_naming_symbols.non_private_readonly_fields.applicable_accessibilities = public, protected, internal, protected_internal, private_protected
dotnet_naming_symbols.non_private_readonly_fields.required_modifiers = readonly

dotnet_naming_style.non_private_readonly_field_style.capitalization = pascal_case

# Constants are PascalCase
dotnet_naming_rule.constants_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.constants_should_be_pascal_case.symbols = constants
dotnet_naming_rule.constants_should_be_pascal_case.style = non_private_static_field_style

dotnet_naming_symbols.constants.applicable_kinds = field, local
dotnet_naming_symbols.constants.required_modifiers = const

dotnet_naming_style.constant_style.capitalization = pascal_case

# Static fields are camelCase and start with s_
dotnet_naming_rule.static_fields_should_be_camel_case.severity = suggestion
dotnet_naming_rule.static_fields_should_be_camel_case.symbols = static_fields
dotnet_naming_rule.static_fields_should_be_camel_case.style = static_field_style

dotnet_naming_symbols.static_fields.applicable_kinds = field
dotnet_naming_symbols.static_fields.required_modifiers = static

dotnet_naming_style.static_field_style.capitalization = camel_case
dotnet_naming_style.static_field_style.required_prefix = s_

# Instance fields are camelCase and start with _
dotnet_naming_rule.instance_fields_should_be_camel_case.severity = suggestion
dotnet_naming_rule.instance_fields_should_be_camel_case.symbols = instance_fields
dotnet_naming_rule.instance_fields_should_be_camel_case.style = instance_field_style

dotnet_naming_symbols.instance_fields.applicable_kinds = field

dotnet_naming_style.instance_field_style.capitalization = camel_case
dotnet_naming_style.instance_field_style.required_prefix = _

# Locals and parameters are camelCase
dotnet_naming_rule.locals_should_be_camel_case.severity = suggestion
dotnet_naming_rule.locals_should_be_camel_case.symbols = locals_and_parameters
dotnet_naming_rule.locals_should_be_camel_case.style = camel_case_style

dotnet_naming_symbols.locals_and_parameters.applicable_kinds = parameter, local

dotnet_naming_style.camel_case_style.capitalization = camel_case

# Local functions are PascalCase
dotnet_naming_rule.local_functions_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.local_functions_should_be_pascal_case.symbols = local_functions
dotnet_naming_rule.local_functions_should_be_pascal_case.style = non_private_static_field_style

dotnet_naming_symbols.local_functions.applicable_kinds = local_function

dotnet_naming_style.local_function_style.capitalization = pascal_case

# By default, name items with PascalCase
dotnet_naming_rule.members_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.members_should_be_pascal_case.symbols = all_members
dotnet_naming_rule.members_should_be_pascal_case.style = non_private_static_field_style

dotnet_naming_symbols.all_members.applicable_kinds = *

dotnet_naming_style.pascal_case_style.capitalization = pascal_case

# error RS2008: Enable analyzer release tracking for the analyzer project containing rule '{0}'
dotnet_diagnostic.RS2008.severity = none

# IDE0073: File header
dotnet_diagnostic.IDE0073.severity = none

# IDE0035: Remove unreachable code
dotnet_diagnostic.IDE0035.severity = warning

# IDE0036: Order modifiers
dotnet_diagnostic.IDE0036.severity = warning

# IDE0043: Format string contains invalid placeholder
dotnet_diagnostic.IDE0043.severity = warning

# IDE0044: Make field readonly
dotnet_diagnostic.IDE0044.severity = warning
dotnet_style_operator_placement_when_wrapping = beginning_of_line
tab_width = 4
end_of_line = lf
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
dotnet_style_prefer_auto_properties = true:silent
dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
dotnet_style_prefer_conditional_expression_over_assignment = true:silent
dotnet_style_prefer_conditional_expression_over_return = true:silent
dotnet_style_prefer_inferred_tuple_names = true:suggestion
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
dotnet_style_prefer_compound_assignment = true:suggestion
dotnet_style_prefer_simplified_interpolation = true:suggestion
dotnet_style_namespace_match_folder = true:suggestion
dotnet_style_readonly_field = true:suggestion
dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent
dotnet_style_allow_multiple_blank_lines_experimental = true:silent
dotnet_style_allow_statement_immediately_after_block_experimental = true:silent
dotnet_code_quality_unused_parameters = all:suggestion
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent

# CSharp code style settings:
[*.cs]
# Newline settings
csharp_new_line_before_open_brace = all
csharp_new_line_before_else = true
csharp_new_line_before_catch = true
csharp_new_line_before_finally = true
csharp_new_line_before_members_in_object_initializers = true
csharp_new_line_before_members_in_anonymous_types = true
csharp_new_line_between_query_expression_clauses = true

# Indentation preferences
csharp_indent_block_contents = true
csharp_indent_braces = false
csharp_indent_case_contents = true
csharp_indent_case_contents_when_block = true
csharp_indent_switch_labels = true
csharp_indent_labels = flush_left

# Prefer "var" everywhere
csharp_style_var_for_built_in_types = false:suggestion
csharp_style_var_when_type_is_apparent = false:suggestion
csharp_style_var_elsewhere = true:suggestion

# Prefer method-like constructs to have a block body
csharp_style_expression_bodied_methods = false:none
csharp_style_expression_bodied_constructors = false:none
csharp_style_expression_bodied_operators = false:none

# Prefer property-like constructs to have an expression-body
csharp_style_expression_bodied_properties = true:none
csharp_style_expression_bodied_indexers = true:none
csharp_style_expression_bodied_accessors = true:none

# Suggest more modern language features when available
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
csharp_style_inlined_variable_declaration = true:suggestion
csharp_style_throw_expression = true:suggestion
csharp_style_conditional_delegate_call = true:suggestion

# Space preferences
csharp_space_after_cast = false
csharp_space_after_colon_in_inheritance_clause = true
csharp_space_after_comma = true
csharp_space_after_dot = false
csharp_space_after_keywords_in_control_flow_statements = true
csharp_space_after_semicolon_in_for_statement = true
csharp_space_around_binary_operators = before_and_after
csharp_space_around_declaration_statements = do_not_ignore
csharp_space_before_colon_in_inheritance_clause = true
csharp_space_before_comma = false
csharp_space_before_dot = false
csharp_space_before_open_square_brackets = false
csharp_space_before_semicolon_in_for_statement = false
csharp_space_between_empty_square_brackets = false
csharp_space_between_method_call_empty_parameter_list_parentheses = false
csharp_space_between_method_call_name_and_opening_parenthesis = false
csharp_space_between_method_call_parameter_list_parentheses = false
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
csharp_space_between_method_declaration_name_and_open_parenthesis = false
csharp_space_between_method_declaration_parameter_list_parentheses = false
csharp_space_between_parentheses = false
csharp_space_between_square_brackets = false

# Blocks are allowed
csharp_prefer_braces = true:silent
csharp_preserve_single_line_blocks = true
csharp_preserve_single_line_statements = true

# warning RS0037: PublicAPI.txt is missing '#nullable enable'
dotnet_diagnostic.RS0037.severity = none
csharp_using_directive_placement = outside_namespace:silent
csharp_prefer_simple_using_statement = true:suggestion
csharp_style_namespace_declarations = block_scoped:silent
csharp_style_prefer_method_group_conversion = true:silent
csharp_style_prefer_top_level_statements = true:silent
csharp_style_expression_bodied_lambdas = true:silent
csharp_style_expression_bodied_local_functions = false:silent
csharp_style_prefer_null_check_over_type_check = true:suggestion
csharp_prefer_simple_default_expression = true:suggestion
csharp_style_prefer_local_over_anonymous_function = true:suggestion
csharp_style_prefer_index_operator = true:suggestion
csharp_style_prefer_range_operator = true:suggestion
csharp_style_implicit_object_creation_when_type_is_apparent = true:suggestion
csharp_style_prefer_tuple_swap = true:suggestion
csharp_style_prefer_utf8_string_literals = true:suggestion
csharp_style_deconstructed_variable_declaration = true:suggestion
csharp_style_unused_value_assignment_preference = discard_variable:suggestion
csharp_style_unused_value_expression_statement_preference = discard_variable:silent
csharp_prefer_static_local_function = true:suggestion
csharp_style_allow_embedded_statements_on_same_line_experimental = true:silent
csharp_style_allow_blank_lines_between_consecutive_braces_experimental = true:silent
csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true:silent
csharp_style_prefer_switch_expression = true:suggestion
csharp_style_prefer_pattern_matching = true:silent
csharp_style_prefer_not_pattern = true:suggestion
csharp_style_prefer_extended_property_pattern = true:suggestion

[src/CodeStyle/**.{cs,vb}]
# warning RS0005: Do not use generic CodeAction.Create to create CodeAction
dotnet_diagnostic.RS0005.severity = none

[src/{Analyzers,CodeStyle,Features,Workspaces,EditorFeatures, VisualStudio}/**/*.{cs,vb}]

# IDE0011: Add braces
csharp_prefer_braces = when_multiline:warning
# NOTE: We need the below severity entry for Add Braces due to https://github.com/dotnet/roslyn/issues/44201
dotnet_diagnostic.IDE0011.severity = warning

# IDE0040: Add accessibility modifiers
dotnet_diagnostic.IDE0040.severity = warning

# CONSIDER: Are IDE0051 and IDE0052 too noisy to be warnings for IDE editing scenarios? Should they be made build-only warnings?
# IDE0051: Remove unused private member
dotnet_diagnostic.IDE0051.severity = warning

# IDE0052: Remove unread private member
dotnet_diagnostic.IDE0052.severity = warning

# IDE0059: Unnecessary assignment to a value
dotnet_diagnostic.IDE0059.severity = warning

# IDE0060: Remove unused parameter
dotnet_diagnostic.IDE0060.severity = warning

# CA1822: Make member static
dotnet_diagnostic.CA1822.severity = warning

# Prefer "var" everywhere
dotnet_diagnostic.IDE0007.severity = warning
csharp_style_var_for_built_in_types = true:warning
csharp_style_var_when_type_is_apparent = true:warning
csharp_style_var_elsewhere = true:warning

[src/{VisualStudio}/**/*.{cs,vb}]
# CA1822: Make member static
# Not enforced as a build 'warning' for 'VisualStudio' layer due to large number of false positives from https://github.com/dotnet/roslyn-analyzers/issues/3857 and https://github.com/dotnet/roslyn-analyzers/issues/3858
# Additionally, there is a risk of accidentally breaking an internal API that partners rely on though IVT.
dotnet_diagnostic.CA1822.severity = suggestion

Many thanks

'Unhandled Stable Diffusion Error'

Had 1.7.1 working fine, made a fresh install of the 1.7.2 today (windows 10, 1070ti with 8Go VRAM).
Everytime I try to run a prompt the event box says :
'Preparing model files...
Unhandled Stable Diffusion Error: The given key was not present in the dictionary.'

And it doesn't process any further.

I've try checking/unchecking every parameters, and strangely it works on low memory mode with OpitimizedSD. But the normal InvokeAI mode was working fine on previous installs, I used various versions of this GUI since a few months.

Got a recent backup so I'll roll the install back to 1.7.1, but I was willing to record the issue here.

v1.8.0 requires internet connection or model loading will always fail

I have been using this GUI for quite some time, version 1.7.2 works perfectly without any internet access once everything is installed, if I firewall my whole PC, it still opens, loads the model and works just fine. However, the new version 1.8.0, requires Data\py\python.exe to be able to connect to the internet every single time the model is going to be loaded into memory, and it works fine without internet after that as long as the model isn't unloaded (no disable idle RAM usage etc). If python.exe is firewalled then the GUI will claim that the model file is incompatible. Why did you change this? Is it so that prompts are "secretly" monitored and people can be banned from using Stable Diffusion by IP or something? I find this new take unacceptable... Please provide a way to keep our privacy and stop spying users.

Can't see model file in other directory

I try to use another model (cpkt-file). I added directory with this model (Settings - Stable Diffusion Model - Folders - Add Folder) but NMKD didn't see it. It can only see model when it's placed in NKMD\data\models directory.

no CUDA GPUs Available

I have an RTX 4090 and it says no CUDA GPUs Available, It is running on Windows 10 Pro with 128gb of RAM

Error writing logs

Pressing the "generate" button, I obtain this error:

image

Windows 11, GUI 1.6, Nvidia GTX 1050 4GB

Thanks in advance

Python error when opening the application for the second time

Starting with version 1.7.0 whenever I launch the application for the second time and click "Generate!" I get this error:

https://www.dropbox.com/s/z4quzd8z604ec23/nmkd-python-error.jpg?raw=1

Until then it was 100% stable. I can only run the application once each time after unzipping. Then I have to delete the entire folder, unzip a fresh copy and start over to be able to run it again. I tried deleting the config.json file, but that doesn't help. Deleting and replacing Data\py folder doesn't help either. I haven't tried the reinstalling feature within the application since unzipping is much faster. Updating to 1.7.1 and updating Nvidia drivers (currently at 526.98) didn't help. Rebooting doesn't help. Windows 11 22H2, RTX3080, 32GB RAM. Thank you!

PS. I wanted to join Discord but they ask for a phone number which is a no no :(

Is SD running in safe mode?

Hi, I was seaching info about my question but I did not find anything related, so I was trying the tool and I think is excellent, but I have that question, is limited to safe mode or not?.

I hope not break any rule, just asking. thanks in advance.

Unrecognized arguments in prompt field

As discussed in the Discord I'm leaving issue for StableDiffusionGui-v1.0.0 here.
Describe the bug
Prompt passes to dream.py without escaping of arguments. In result, field "Prompt" can be used to set dream.py's optional arguments and possible break processing.

To Reproduce
Steps to reproduce the behavior:

  1. Enter text, which includes any valid or invalid dream.py's argument into Prompt field of the GUI. e.x: "-h", "-asd", "- asd"
  2. Click on 'Generate!'
  3. Wait for "Done!" in log field of bottom right in the window (or in the sessionlog.txt).
  4. Invalid aruments will leave error message "dream.py: error: unrecognized arguments:", valid arguments will either apply to processing or render help information into log.

Expected behavior
It could be either:

  1. No errors and everything works fine (ha-ha sorry)
  2. Showing proper error message in the log field.
  3. Processing as if no arguments are expected in Prompt field and all the text in it assumed as prompt

Screenshots
image
image

Desktop (please complete the following information):

  • OS: Windows 11 Education Insider Preview
  • Build 25182.rs_prerelease.220812-1437
  • App verision might be: v1.0.0

Laptop GPUs. Tries to use integrated GPU and as expected fails to load model.

Problem:
When trying to generate image using laptop python tries to use integrated GPU and fails to load the model.
Found solution:
To fix it by yourself you need to go windows settings (win+I), go to graphics and add python.exe file from Data/py to list and say that it should use discrete GPU by default.
Used device:

Windows 10
Laptop MSI Alpha 15
Processor: AMD Ryzen™ 5 5600H
Integrated GPU: AMD Radeon Graphics 512mb vram
Discrete GPU: AMD RX 6600m with 8gb vram.

Exception from sd.txt log:

[00000077] [12-29-2022 11:06:25] Traceback (most recent call last):
[00000078] [12-29-2022 11:06:25] File "C:\SD-GUI-1.8.1\Data\repo\sd_onnx\sd_onnx.py", line 64, in
[00000079] [12-29-2022 11:06:25] pipe = OnnxStableDiffusionPipeline.from_pretrained(opt.mdlpath, provider=prov, safety_checker=None)
[00000080] [12-29-2022 11:06:25] File "C:\SD-GUI-1.8.1\Data\venv\lib\site-packages\diffusers\pipeline_utils.py", line 709, in from_pretrained
[00000081] [12-29-2022 11:06:25] loaded_sub_model = load_method(os.path.join(cached_folder, name), **loading_kwargs)
[00000082] [12-29-2022 11:06:25] File "C:\SD-GUI-1.8.1\Data\venv\lib\site-packages\diffusers\onnx_utils.py", line 206, in from_pretrained
[00000083] [12-29-2022 11:06:25] return cls._from_pretrained(
[00000084] [12-29-2022 11:06:25] File "C:\SD-GUI-1.8.1\Data\venv\lib\site-packages\diffusers\onnx_utils.py", line 173, in _from_pretrained
[00000085] [12-29-2022 11:06:25] model = OnnxRuntimeModel.load_model(
[00000086] [12-29-2022 11:06:25] File "C:\SD-GUI-1.8.1\Data\venv\lib\site-packages\diffusers\onnx_utils.py", line 78, in load_model
[00000087] [12-29-2022 11:06:25] return ort.InferenceSession(path, providers=[provider], sess_options=sess_options)
[00000088] [12-29-2022 11:06:25] File "C:\SD-GUI-1.8.1\Data\venv\lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 347, in init
[00000089] [12-29-2022 11:06:25] self._create_inference_session(providers, provider_options, disabled_optimizers)
[00000090] [12-29-2022 11:06:25] File "C:\SD-GUI-1.8.1\Data\venv\lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 395, in _create_inference_session
[00000091] [12-29-2022 11:06:25] sess.initialize_session(providers, provider_options, disabled_optimizers)
[00000092] [12-29-2022 11:06:25] onnxruntime.capi.onnxruntime_pybind11_state.RuntimeException

improvement request: more space for text in the prompt window

if the prompt window could be increased vertically, that would make the bigger font sizes way more usable (bad eyes and all that) and also make it easier to input and manage a larger number of prompts in parallel.

with negative prompts sharing the same space as positive prompts i find myself stretching the window to about 4 times its height so i can fit all the text on screen, which is less then ideal.

Can anybody help me with what this error means?

I haven't spent much time with a pc for a couple years, and i was wondering what this/these error(s) mean.
any help would be appreciated!

Unhandled Thread Exception!

Could not load file or assembly 'System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

Stack Trace:
at StableDiffusionGui.ExtensionMethods.MatchesWildcard(String str, String wildcard)
at StableDiffusionGui.Ui.MainUi.DoStartupChecks()
at StableDiffusionGui.MainForm.d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at StableDiffusionGui.MainForm.<MainForm_Shown>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

No Images generated

The "No Images Generated" error always appears when I use the "ONNX" option.
My device:
*RX 580 8GB

  • I3-9100F
  • 16GB RAM

What I already tried and it didn't work:

  • Several different values for "Generation Steps".
  • Several different values for "CFG Scale".
  • Several different resolutions.
  • Two different ONNX models.

I tried generating pictures with the "CUDA" options using just the CPU and it worked.
So the "No Images Generated" only appears when I use ONNX.
1
2

Portability issues

I have downloaded release from https://nmkd.itch.io/t2i-gui
It does not work on new machine without internet, throws an error from request.py
In installers last checkbox is not set.
If I turn internet on and press Re-install it downloads something, then on first generation it downloads something else, then it works without internet.
Folder grows up to 10GB.
But still it is not portable. Something that was downloaded is placed outside SD-GUI folder. If I take this folder and transfer it to other machine without internet, I still got error from request.py

Can it be fixed? Such product can eventually become essential and thus, it can't have any dependencies.

Inpainting using entire canvas size causing weird results

When you mask an image, it uses the whole original canvas size as a base.

I'm not sure how to explain it or the technical terms, but I will try.

Say I want to put "a person" into a scene, it will render it to the whole base image size, then just mask part of that person into the scene (usually part of the body or face)

Other in-painters using the exact same models will render it to the mask size, or something similar and put the whole person into the mask.

Yours:
2022-10-24-19-51-57-1-a_cat-1736819565-scale16 00-ddim-stable-diffusion-1 4

Others:
a_cat__sitting_on_a_bench_AAGNXQHI_RealESRGAN_x4plus

Same prompt, tried multiple times with same and different seeds and iterations.

Unhandled Exception Error, when cancelling an image generating

I started receiving this Error after upgrading to 1.5.0 while pressing the cancel button to stop the current generation process. I did get the error while working with a loaded image and just on a pure prompt image generation.

This is a fatal error which it's required to close and relaunch to proceed with the project.

************** Exception Text **************
System.ArgumentException: An item with the same key has already been added.
   at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at StableDiffusionGui.Main.TextToImage.<>c__DisplayClass16_0.<WaitForDreamPyCancel>b__1(String x)
   at System.Collections.Generic.List`1.ForEach(Action`1 action)
   at StableDiffusionGui.Main.TextToImage.<WaitForDreamPyCancel>d__16.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at StableDiffusionGui.Main.TextToImage.<Cancel>d__15.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

Does not compile in my VS2019

Your documentation is quite little at this point in time, im not complaining, but I wonder what I need to do to get it compile :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.