Streamlining Your Stable Diffusion Extensions update with a Handy PowerShell Script in terminal

When dealing with multiple git repositories in subdirectory. going to each one and making a git pull requires time and can be tedious. Software like stable diffusion the generative image AI with its multiple extensions. although you can update them inside the gui. updating the extensions through terminal is smooth and easy to manage if you have a script.  That’s where pullall.ps1, a PowerShell script, comes into play. This script is a lifesaver for enthusiasts working with multiple Git repositories, particularly those related to Stable Diffusion extensions. Let’s dive deeper into how this script can enhance your workflow.

The Role of Git and GitHub in Managing Stable Diffusion Extensions
Before we get into the script, let’s understand the context. Stable Diffusion, like many other software projects, often requires the installation of multiple extensions. These extensions are frequently hosted on GitHub and managed using Git, a distributed version control system. Each extension is typically in its own Git repository. This setup ensures that the core software remains stable while allowing users to experiment with and contribute to various extensions.

The Challenge of Managing Multiple Repositories
Managing several Git repositories can be cumbersome, especially if you’re trying to keep all your extensions up to date. Traditionally, you’d have to navigate to each repository’s directory and run git pull manually. This is time-consuming and prone to human error.

Solution: The pullall.ps1 Script:

Create a file called pullall.ps1 in the directory where extensions stored. then you can run it in powershell as .\pullall.ps1

# This script finds all Git repositories in the current directory and its subdirectories, and runs `git pull` in each one.

Get-ChildItem -Recurse | Where-Object { $_.PSIsContainer -and (Test-Path "$($_.FullName)\.git") } | ForEach-Object { Set-Location $_.FullName; git pull }

The pullall.ps1 script presents an elegant solution to this problem. Written in PowerShell, a powerful scripting language for automating the Windows environment, this script automates the process of updating all your Git repositories in one go. It’s especially useful for developers and tech enthusiasts who work with multiple extensions of Stable Diffusion.

How the Script Works
Finding Repositories: The script starts by using the Get-ChildItem -Recurse command, which searches for items in the current directory and its subdirectories.

Filtering for Git Repositories: It then filters these items using Where-Object. This part of the script checks two conditions: whether the item is a directory ($_.PSIsContainer) and whether this directory contains a .git folder (indicating it’s a Git repository).

Updating Each Repository: Finally, for each Git repository found, the script changes the current location to that repository’s directory (Set-Location $_.FullName) and executes git pull. This command updates the local repository with the latest changes from its remote counterpart.

Applications Beyond Stable Diffusion
While particularly beneficial for managing Stable Diffusion extensions, pullall.ps1 is not limited to this use case. It’s a versatile tool that can be used in any scenario where you have multiple Git repositories. Whether you’re a web developer managing various project modules or a data scientist working with different data sets, this script can save you a significant amount of time and effort.

In the rapidly evolving world of software development, tools that save time and reduce repetitive tasks are invaluable. The pullall.ps1 script is a perfect example of such a tool. It exemplifies how a simple automation script can have a substantial impact on your workflow, allowing you to focus on more creative and challenging aspects of your projects.

For Stable Diffusion enthusiasts and developers managing multiple Git repositories, incorporating this script into your routine can streamline your update process, ensuring that you’re always working with the latest and greatest extensions without the hassle of manual updates. Happy coding! 🚀

Corrupt directory causes windows issues and hanging

Windows 10 is a popular and reliable operating system, but it can sometimes encounter issues that make it difficult to use. If you’re experiencing problems like Windows Defender hanging in quick scan, your PC not restarting, or weird things happening on your computer, you’re not alone. In this article, we’ll take a look at some of the most common Windows 10 problems and how to solve them.

One common issue that many Windows 10 users face is that their PC hangs almost daily. When this happens, the taskbar may stop responding, new applications won’t start, and the Ctrl-Alt-Del function doesn’t work. Eventually, everything may stop, including the desktop. Because this problem doesn’t happen every time, it can be difficult to determine the cause.

Some users assume that the problem may be due to hardware issues and will try removing and replacing parts or replacing hard disk cables. However, this often doesn’t solve the problem.

If you’re experiencing these issues, it may be time to consider other possible causes. For example, you may have inherited some old programs from previous versions of Windows that are no longer compatible with Windows 10. One common example is Nero 7 Essentials, which may no longer work properly on your system. It’s also possible that some of the default Windows features may be causing the problem. For instance, some features that are enabled or disabled by default may need to be changed.

However, one other rare cause of these issues may be a corrupt directory like Cygwin for me that has been kept on the C drive. If the directory name has turned into some wrongly encoded character, it may be impossible to delete it from Windows Explorer. This can cause some Windows services like search indexer and Windows Defender scheduled scan to hang, which can then cause Windows to hang.

To solve these issues, it’s important to uninstall any old programs that may be causing compatibility issues. You can also check the default Windows features that are enabled and disabled and make sure that they are appropriate for your system. Finally, you should check for any corrupt directories on your system and take steps to delete them if necessary.

By following these steps, you can solve some of common Windows 10 problems and ensure that your system is running smoothly and efficiently.

How to find all symbolic links junctions on windows drive

TL;DR::cmd (administrator) dir /AL /S C:\ 

Or dir /AL /S C:\ > junctions.txt
To print the output to a file. which is better.

Does Windows have symbolic links like Linux?

Yes. windows has symbolic links also called junctions.  What are junctions? they are simply links to another location on a hard drive or network drive. The operating system and most programs will treat symbolic links like if they were actual folder. This is very useful when dealing with low disk space especially on pricey ssd (although these are getting cheaper) or eMMC on laptops.   Some programs simply insist on storing their data on C application data. but they aren’t essential apps that need to run all the time. Things like Android studio or Netbeans.  you may run one or the other most of the time. but still these programs store large amount of data.

Break down of the command:

DIR:  list files and folders in current working directory or specified one.
AL:   A switch is to display files with specific attributes such as hidden files, directories, read only.   L attribute is for Junctions (Reparse Points)
S:  means to include System files in the results.
>  redirects output to a file.

IE 11 not opening, crashing on Windows 10 after upgrade from windows 7, How to solve

After upgrading from windows 7 to 10,  IE 11 doesn’t open.  I have searched a lot but didn’t find a solution.  One solution suggested it was due to logitech camera’s process monitor. but removing that didn’t solve the problem.   The error log in event viewer was this:

Faulting application name: iexplore.exe, version: 11.0.10240.16412, time stamp: 0x55b99d3f
Faulting module name: ntdll.dll, version: 10.0.10240.16430, time stamp: 0x55c59f92
Exception code: 0xc0000409

After some digging, it turned out it was due to EMET 5.2 Microsoft mitigation service.  seems Microsoft security service breaks its own program.   I uninstalled it, IE 11 worked. I reinstalled it after downloading it again from Microsoft site.  IE 11 stopped working.  I opened EMET notification and went into apps and tested the different checkboxes for IE.  unchecked EAF and leaving other checks worked.

TL;DR;  If you have EMET 5.2 installed, opening EMET, going to APPS -> unchecking EAF in front of Internet Explorer and then OK should make IE work again.  what security implication that means not sure. but Microsoft should fix this soon.


Fail while upgrading to windows 10 from 7, Error 0xC1900101 – 0x40017: Potential fix

I have tried to upgrade windows 10 from 7 for 5 times but failed. It reverts back to windows 7 then displays a window with error in second_boot with number 0xC1900101 – 0x40017 but on my 6th attempt I was successful.
IMG_7619 - Copy


Logs are stored in c:\windows  beside windows bt and ws.   I assume the ones where I could find the reason for failure get deleted once windows recover to previous version.  so if you face a problem tries to copy those logs when it restarts using a linux installation or Live CD.  then search for *.log  in c:\windows   setuperr.log and setupacc.log should have useful information.

Before the last successful attempt. I did the following:

1. sfc /scannow this by the way always discovered errors for me not sure why.

2. updated everything from windows update. except security essentials.

3. From previous failed attempt I already uninstalled Avast. I turned off firewall in my second failed attempt but turned it back on.

4. Unplugged all USBs except keyboard and mouse.

5. Removed some hidden and left over drivers, please see this:

6. Uninstalled some potential troublemaking software particularly media center extenders, Media center is gone from Windows 10. so they can be trouble.
Here are some drivers I removed.
– Old Nvidia display driver. because I switched to AMD.

– HP printer. My HP printer already broken. and I found out so many HP printer driver leftovers something like 10 . I removed their software(s) a lot of them and each one trying to restart the computer anyway. ugh HP

– PC USB driver for OneSeg TV. probably you don’t have this.

– PCI driver for Satellite TV tuner card. this works with Media center so it is useless.

– Removed all usb drivers that are not active. they include several flash drives. also drivers for hard disks I no longer have.
I think what likely fixed the issue is 5 & 6 particularly media center extenders and old drivers for Nvidia. when I installed AMD I didn’t uninstall Nvidia first. but there is good chance that HP with their horrendous software and/or other usb drivers caused the issue. I suggest you try the same but be careful you don’t remove something essential. Make sure to restart after you do all.

Also I tried the install from ISO. but I don’t think related, but my previous 5th attempt was from ISO too.

Finally, there is a slim chance that weird funny thing happened when I logged in to Linux when it restarted after 70% that magically fixed the issue.