Skip to content

Conversation

@monstruosoft
Copy link
Contributor

This PR adds LoRA and ControlNet tabs to the Qt GUI. LoRA and ControlNet are currently only supported for SD 1.5.

Add LoRA models tab to the Qt GUI
Code formatting
Add ControlNet models tab to the Qt GUI
Added the common_widgets.py file to remove duplicated code for the
ControlNet and LoRA tabs in the Qt GUI.
This commit attempts to reset the loaded LoRAs in the Qt GUI when
the image generation pipeline is rebuilt.
Minor changes
Minor changes
Merge local branch into lora branch
@rupeshs
Copy link
Owner

rupeshs commented Aug 2, 2025

@monstruosoft Thanks for the PR .
I got an issue with this PR

  • Installed FastSD
  • Started desktop GUI
  • Clicked enable controlnet
  • Crashed
    We need to avoid this kind of crash; defensive programming will help. It enables more robust and reliable applications.
    One suggestion is to use a descriptive name for the git branch, for example "add-lora-and-controlent-qtgui"
image

@monstruosoft
Copy link
Contributor Author

Thanks for spotting that crash, will fix it ASAP.

This commit fixes a crash when enabling ControlNet prior to
initializing a pipeline in the Qt GUI.
@monstruosoft
Copy link
Contributor Author

The latest commit should fix the crash. Sorry it took that long for me to post such a simple fix.

@rupeshs
Copy link
Owner

rupeshs commented Aug 10, 2025

@monstruosoft
Please disable these buttons if no Loras are available and prevent the user from clicking this button. Currently, it is crashing. Also add some padding to "Load Selected Lora" button, now the text is completly filled inside button
image

@rupeshs
Copy link
Owner

rupeshs commented Aug 10, 2025

@monstruosoft Enable controlnet checkbox still causing crash
image

@monstruosoft
Copy link
Contributor Author

Right... sorry. Both of these crashes are caused when there are no LoRAs or ControlNet adapters available.

@rupeshs
Copy link
Owner

rupeshs commented Aug 10, 2025

Right... sorry. Both of these crashes are caused when there are no LoRAs or ControlNet adapters available.

We want to avoid all cases of crashes, as it will impact the quality of FastSD

@monstruosoft
Copy link
Contributor Author

Sure. It's easy to miss the case when there are no LoRAs if you're trying to make LoRAs work. Will code a fix for these crashes.

@rupeshs
Copy link
Owner

rupeshs commented Aug 10, 2025

Sure. It's easy to miss the case when there are no LoRAs if you're trying to make LoRAs work. Will code a fix for these crashes.

Thank you

This commit fixes a crash in the Qt GUI when there are no LoRAs or
ControlNet adapters present.
@monstruosoft
Copy link
Contributor Author

OK, hopefully the crashes are really fixed this time.

@rupeshs
Copy link
Owner

rupeshs commented Aug 10, 2025

OK, hopefully the crashes are really fixed this time.
Thanks for the update.
Issue: Unable to drag and drop an image to ControlNet UI

@rupeshs
Copy link
Owner

rupeshs commented Aug 10, 2025

@monstruosoft Please remove the highlighted logging line
image

@monstruosoft
Copy link
Contributor Author

Unable to drag and drop an image to ControlNet UI

Can you give more details about that? I have no issues there. I'm running FastSD on Linux.

@rupeshs
Copy link
Owner

rupeshs commented Aug 10, 2025

Unable to drag and drop an image to ControlNet UI

Can you give more details about that? I have no issues there. I'm running FastSD on Linux.

Drag and drop is not working on Windows, and also unable to check "Enable ControlNet" since it is disabled.

image

@monstruosoft
Copy link
Contributor Author

Are there any ControlNet adapters in the controlnet_models folder? Much like in the LoRA tab, if there are no .safetensors files in that folder, the option to use ControlNet will be disabled. Drag and drop will only work with ControlNet enabled so that should do it.

@rupeshs
Copy link
Owner

rupeshs commented Aug 11, 2025

Are there any ControlNet adapters in the controlnet_models folder? Much like in the LoRA tab, if there are no .safetensors files in that folder, the option to use ControlNet will be disabled. Drag and drop will only work with ControlNet enabled so that should do it.

Ok then please add the highlighted message so that it will be useful for the users.

image

@rupeshs
Copy link
Owner

rupeshs commented Aug 11, 2025

@monstruosoft I added controlnet model,enabled controlnet but still drag and drop is not working we need a solution it should work cross platform(Windows/Linux/Mac).

@monstruosoft
Copy link
Contributor Author

OK, will add the ControlNet message.
Unfortunately, I'm running FastSD on Linux and don't have access to a Windows machine at the moment, at least not one with a whole Python virtual environment installed. I thought Qt would behave the same on every platform. For the time being I could add a File dialog to select a file, much like in the img2img and upscale tabs.

@rupeshs
Copy link
Owner

rupeshs commented Aug 11, 2025

OK, will add the ControlNet message. Unfortunately, I'm running FastSD on Linux and don't have access to a Windows machine at the moment, at least not one with a whole Python virtual environment installed. I thought Qt would behave the same on every platform. For the time being I could add a File dialog to select a file, much like in the img2img and upscale tabs.

Yes, that is perfect

Add ControlNet file selection dialog
Add ControlNet file selection dialog
@monstruosoft
Copy link
Contributor Author

Added a File dialog button to the ControlNet tab. Hopefully it's working correctly this time.

Fix typo
@rupeshs
Copy link
Owner

rupeshs commented Aug 15, 2025

Added a File dialog button to the ControlNet tab. Hopefully it's working correctly this time.

@monstruosoft Thanks, a few more comments regarding UI

  1. Add a label for the slider "ControlNet conditioning scale"
  2. Add a label for the controlnet model combo box "Controlnet Model"
  3. Default value of ControlNet conditioning scale should be 0.5 (same as webui)
  4. Model download link click is not working(label.setOpenExternalLinks(True))
  5. Please remove drag and drop completely since it is not working with Windows

Minor Qt GUI changes
Minor Qt GUI changes
@monstruosoft
Copy link
Contributor Author

I made all the suggested changes. To be fair, I removed the drag and drop message but the widget still allows dropping an image, on Linux, that is. I find it useful when using FastSD myself.

@rupeshs
Copy link
Owner

rupeshs commented Aug 16, 2025

I made all the suggested changes. To be fair, I removed the drag and drop message but the widget still allows dropping an image, on Linux, that is. I find it useful when using FastSD myself.

Now UI is looking good, but the default conditioning scale is not working

image

Fix default ControlNet weight.
@monstruosoft
Copy link
Contributor Author

Sorry, my bad. It should be correct this time.

@rupeshs rupeshs merged commit 998cab2 into rupeshs:main Aug 17, 2025
@rupeshs
Copy link
Owner

rupeshs commented Aug 17, 2025

@monstruosoft Thank you for the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants