Taking Stable Diffusion for a spin on a basic laptop

I’ve been quite intrigued by the recent public releases of Dall-E followed by Stable Diffusion which allow you to generate images from simple text prompts, & had been trying them out on the free online platforms. The main limitation of these is that you are limited to a certain quota for free, and to really try an opensource tool like Stable Diffusion locally, you need to pretty beefy system with a high end GPU.

All that changed when I came across a project on GitHub that lets you run Stable Diffusion on the CPU thanks to Intel’s OpenVINO framework. I promptly took it for a spin on my 4 year old laptop with an Intel quad core 8th gen CPU. The instructions are provided on the GitHub project itself as expected. If you are using Windows like me, you can do the following:

  • Install Anaconda which simplifies the Python setup.
  • Create a new environment in Anaconda for the project.
  • Open the terminal, create a directory for the project & clone the GitHub repository for the project using the git clone https://github.com/bes-dev/stable_diffusion.openvino.git command with the project web URL.
  • Follow the installation instructions on the project page:
    • Install the project dependencies using pip install -r requirements.txt
    • Enable Developer Mode in Windows settings which allows the model to be downloaded on first run.
    • If you plan to use the web interface also install streamlit drawable canvas using pip install streamlit-drawable-canvas, as this module dependency seemed to be missing in the documentation & gave me errors on trying to run the web demo.
  • Run the script as per instructions replacing the prompt if you want (the developer seems to be a GoT/Emilia Clarke fan) – python demo.py --prompt "Street-art painting of Emilia Clarke in style of Banksy, photorealism"

On my laptop it takes about 8-10 min to generate an image, though a more powerful CPU with more RAM should be able to cut it down to 3-4 min as mentioned in the project page benchmarks. Either way, it is a worthwhile tradeoff to be able to run it locally.

Here are a couple of results from the prompts I ran on my laptop (I chose a couple of the timeless beauties to see what Stable Diffusion has to offer):

Laptop abruptly falling asleep? Check your watch strap

I exchanged my Lenovo ThinkPad X260 work laptop for the newer T14 model last Wednesday, and spent the first half of the day setting up the new model. When I started using it in the second half of the day, I had 3 instances when it went off into hibernate mode without any warning, while I was working. In fact, the first couple of times it happened during the same call. The only silver lining was that the new machine was quite fast & didn’t take long to start after hibernating.

The battery levels were full, and disabling auto sleep didn’t seem to make any difference. I didn’t seem to be triggering any special gesture on the trackpad or fingerprint reader either. Google results didn’t have much beyond the usual check for defects/battery/OS issues. The only tell tale sign was that I was using the keyboard when this happened.

It was on the 3rd instance that I suspected that my magnetic watch strap was engaging the lid closure detection magnets built into the palm rest. A quick tapping around the suspected area confirmed my suspicion – it was my magnetic leather watch strap that was triggering the hibernation as the laptop thought that the lid was closed. Don’t think there is a solution other than using non-magnetic straps when working directly on the laptop.

I do use a laptop stand with external keyboard & mouse when working from home, so magnetic straps should be fine. However, no special watch straps when in office it seems 😦

Upgrading to Windows 10 on a 4 year old laptop

Upgrading to Windows 10
Upgrading to Windows 10

I finally bit the bullet and upgraded my 4 year old Acer Aspire 5750G laptop to Windows 10 from Windows 7 thanks to the free upgrade offer. I managed to wait for a couple of weeks after the release before pulling the plug. The machine is quite reasonably specced with a Core i5-2410M processor, 4 GB RAM, 1 TB HDD (upgraded from 500 GB) and the NVIDIA 540M GPU, and barring the slow hard disk is well equipped to run Windows 10.

The upgrade process was itself quite painless – took a good amount of time to download on my 2 Mbps connection, but the installation itself took around 1.5 hours. There were a few updates including one for the touchpad, and they installed without much fuss either. I also updated the NVIDIA graphics drivers to the Windows 10 version.

The OS itself is quite easy to use and I find the interface an improvement over Windows 7 and agree with my most read reviewers. Compared to Windows 8\8.1 that I’ve used intermittently over the last few years, the experience is definitely a marked improvement particularly on laptops.

The overall experience is pretty much as it was in Windows 7 for me as there are not that many useful Windows Store apps yet, and the laptop is without a touchscreen to make use of full screen apps. The improvements to Explorer, Task Manager and rest of the OS are of course welcome, but would definitely have not been a compelling reason to upgrade were it not free. Cortana has unfortunately not yet released for India, and some of the newer security features require newer hardware.

Having used a MacBook Air for over a year and a half now, I do find some of the new features like multiple desktops quite useful but the experience is hampered by the poor touchpad. Then of course there is the HDD vs SSD performance chasm that puts a big dampener on the Windows usage. If you are eligible for an update, don’t hesitate to pull the trigger (unless you have some incompatible components of course). I’ve also signed up for the Insider builds for some more excitement and quicker access to new features.

The next few months should be interesting with the touch versions of Office for Windows being released and the next generation of Intel processors showing up in devices. Maybe a compelling time for an update…

HP Omen, Spectre x360 and Pavilion launch hands-on

HP had their launch event in Mumbai for the Omen, Spectre x360 and refreshed Pavilion series earlier this week, and I managed to get some hands-on time with the laptops. The new partnership with Bang & Olufsen for the speakers and sound system was one of the highlights of the launch, now that Beats is owned by Apple.

HP Omen gaming laptop

Possibly HP’s first real foray into gaming laptops, and almost certainly their first gaming laptop launched in India. The specifications are pretty top notch with a 256 GB PCIe based SSD, 8 GB RAM, a 15″ full HD IPS touchscreen display powered by an NVIDIA GeForce 960M & Core i7 quad core processor, customisable backlighting for the keyboard and B&O speakers of course.

The touchpad felt quite spacious and seemed pretty responsive – not MacBook levels but definitely top notch in the Windows world. It also comes with a gaming mouse, which had additional buttons but didn’t seem to have adjustable weights though. The ports are also all positioned at the back of the laptop which is quite rare in laptops these days. The device weighs a little over 2 kgs and has a pretty slim profile as well which is definitely rare for a gaming machine. Of course this could lead to performance throttling especially in Indian conditions which only a full fledged review can verify.

It is the priciest of the laptops launched at almost Rs 1.6L, but gaming laptops seem to be taking off in India given the Alienware and MSI laptops on offer online and in major electronics stores. However there seems to be only one configuration on offer at the moment.

HP Spectre x360 convertible ultrabook

Another premium device but in a very different form factor – a cross between a Lenovo Yoga and a MacBook. The all metal build for this convertible makes for a very attractive looking device that highlights the focus on design that HP has placed on their latest laptops. The specs are definitely high end for the form factor as HP has opted for a dual-core Core i7 CPU over the Core M in the Lenovo Yoga 3 and Asus ZenBook. This coupled with the 256 GB PCIe SSD and 8 GB RAM should ensure a fairly future proof machine. At 1.4 kg, it is a tad heavier than the Yoga 3 and ZenBook, but you get an all metal build in return that should be sturdier, and it is still significantly lighter than your typical ultrabook.

The display is also high resolution and the hinge is quite smooth but firm ensuring that the device stays in the mode you opt for. HP has also not messed around with the keyboard like Lenovo and we get the full row of function keys atop the numbers row. The keys are backlit as well, but not your typical white on black. They’ve opted to go with a black on steel scheme, and it did seem to affect visibility a bit in some lighting situations.

At the moment there seems to be only one configuration on offer for around Rs 1.3L which is well into the premium segment where MacBook Pros play. However, the configuration itself is very competitive and built to last a while with no major compromises. The Pro edition of Windows 8.1 that comes with the laptop also highlights it focus on the prosumer market.

HP Pavilion refresh

The Pavilion is of course HP’s budget range of laptops and while the specs are pretty good for the price – Core i3\i5\i7, 1 TB HDD, 4-8 GB RAM, full HD display and upto an NVIDIA GeForce 940M – they pale in comparison to the two flagships launched with them. HP emphasised on the fact that they upped the display on all models to full HD, albeit non-IPS.

Doing a hands-on with the Core i5 & i7 models after playing around with the Omen and Spectre was probably not the best way to get acquainted with this series as the display paled in comparison with the flagships’ with poor viewing angles. At least the resolution has been increased and this should considerably improve the user experience. The trackpads were also a big letdown as they failed to register clicks reliably during my hands on and highlights the gap with premium devices.

Overall, the devices were definitely quite competitive for their segment, starting around Rs 45K.

The laptops come with Windows 8.1, and with Windows 10 launch around the corner, we can definitely expect these new devices to play an important role in the user adoption of the new OS.

This slideshow requires JavaScript.