runwayml/stable-diffusion by Ciro Santilli 35 Updated +Created
Conda install is a bit annoying, but gets the job done. The generation quality is very good.
Someone should package this better for end user "just works after Conda install" image generation, it is currently much more of a library setup.
Tested on Amazon EC2 on a g5.xlarge machine, which has an Nvidia A10G, using the AWS Deep Learning Base GPU AMI (Ubuntu 20.04) image.
First install Conda as per Section "Install Conda on Ubuntu", and then just follow the instructions from the README, notably the Reference sampling script section.
git clone https://github.com/runwayml/stable-diffusion
cd stable-diffusion/
git checkout 08ab4d326c96854026c4eb3454cd3b02109ee982
conda env create -f environment.yaml
conda activate ldm
mkdir -p models/ldm/stable-diffusion-v1/
wget -O models/ldm/stable-diffusion-v1/model.ckpt https://huggingface.co/CompVis/stable-diffusion-v-1-4-original/resolve/main/sd-v1-4.ckpt
python scripts/txt2img.py --prompt "a photograph of an astronaut riding a horse" --plms
This took about 2 minutes and generated 6 images under outputs/txt2img-samples/samples, includining an image outputs/txt2img-samples/grid-0000.png which is a grid montage containing all the six images in one:
https://raw.githubusercontent.com/cirosantilli/media/master/Runwayml_stable-diffusion_a-photograph-of-an-astronaut-riding-a-horse.png
TODO how to change the number of images?
A quick attempt at removing their useless safety features (watermark and NSFW text filter) is:
diff --git a/scripts/txt2img.py b/scripts/txt2img.py
index 59c16a1..0b8ef25 100644
--- a/scripts/txt2img.py
+++ b/scripts/txt2img.py
@@ -87,10 +87,10 @@ def load_replacement(x):
 def check_safety(x_image):
     safety_checker_input = safety_feature_extractor(numpy_to_pil(x_image), return_tensors="pt")
     x_checked_image, has_nsfw_concept = safety_checker(images=x_image, clip_input=safety_checker_input.pixel_values)
-    assert x_checked_image.shape[0] == len(has_nsfw_concept)
-    for i in range(len(has_nsfw_concept)):
-        if has_nsfw_concept[i]:
-            x_checked_image[i] = load_replacement(x_checked_image[i])
+    #assert x_checked_image.shape[0] == len(has_nsfw_concept)
+    #for i in range(len(has_nsfw_concept)):
+    #    if has_nsfw_concept[i]:
+    #        x_checked_image[i] = load_replacement(x_checked_image[i])
     return x_checked_image, has_nsfw_concept


@@ -314,7 +314,7 @@ def main():
                             for x_sample in x_checked_image_torch:
                                 x_sample = 255. * rearrange(x_sample.cpu().numpy(), 'c h w -> h w c')
                                 img = Image.fromarray(x_sample.astype(np.uint8))
-                                img = put_watermark(img, wm_encoder)
+                                # img = put_watermark(img, wm_encoder)
                                 img.save(os.path.join(sample_path, f"{base_count:05}.png"))
                                 base_count += 1
but that produced 4 black images and only two unfiltered ones. Also likely the lack of sexual training data makes its porn suck, and not in the good way.
City of Light: The Story of Fiber Optics by Ciro Santilli 35 Updated +Created
The book is a bit slow until Charles K. Kao comes along, then it gets exciting.
Virtuoso Universal Server by Ciro Santilli 35 Updated +Created
Ubuntu 18.04 by Ciro Santilli 35 Updated +Created
AerError: 'unknown instruction by Ciro Santilli 35 Updated +Created
You get an error like this if you forget to call qiskit.transpile():
qiskit_aer.aererror.AerError: 'unknown instruction: QFT'
Related: quantumcomputing.stackexchange.com/questions/34396/aererror-unknown-instruction-c-unitary-while-using-control-unitary-operator/35132#35132
gfx_v11_0_priv_reg_irq: register access in command stream by Ciro Santilli 35 Updated +Created
Had this happen on P14s on Ubuntu 23.10 while causally using Chromium. The screen went blank for a few seconds, but it apparently managed to reboot itself, and things started working again, except that and most windows were killed:
[drm:gfx_v11_0_priv_reg_irq [amdgpu]] *ERROR* Illegal register access in command stream
[drm:amdgpu_job_timedout [amdgpu]] *ERROR* ring gfx_0.0.0 timeout, signaled seq=5774109, emitted seq=5774111
[drm:amdgpu_job_timedout [amdgpu]] *ERROR* Process information: process chrome pid 14023 thread chrome:cs0 pid 14087
amdgpu 0000:64:00.0: amdgpu: GPU reset begin!
[drm:mes_v11_0_submit_pkt_and_poll_completion.constprop.0 [amdgpu]] *ERROR* MES failed to response msg=3
[drm:amdgpu_mes_unmap_legacy_queue [amdgpu]] *ERROR* failed to unmap legacy queue
[drm:mes_v11_0_submit_pkt_and_poll_completion.constprop.0 [amdgpu]] *ERROR* MES failed to response msg=3
[drm:amdgpu_mes_unmap_legacy_queue [amdgpu]] *ERROR* failed to unmap legacy queue
[drm:mes_v11_0_submit_pkt_and_poll_completion.constprop.0 [amdgpu]] *ERROR* MES failed to response msg=3
[drm:amdgpu_mes_unmap_legacy_queue [amdgpu]] *ERROR* failed to unmap legacy queue
[drm:mes_v11_0_submit_pkt_and_poll_completion.constprop.0 [amdgpu]] *ERROR* MES failed to response msg=3
[drm:amdgpu_mes_unmap_legacy_queue [amdgpu]] *ERROR* failed to unmap legacy queue
[drm:mes_v11_0_submit_pkt_and_poll_completion.constprop.0 [amdgpu]] *ERROR* MES failed to response msg=3
[drm:amdgpu_mes_unmap_legacy_queue [amdgpu]] *ERROR* failed to unmap legacy queue
[drm:mes_v11_0_submit_pkt_and_poll_completion.constprop.0 [amdgpu]] *ERROR* MES failed to response msg=3
[drm:amdgpu_mes_unmap_legacy_queue [amdgpu]] *ERROR* failed to unmap legacy queue
[drm:mes_v11_0_submit_pkt_and_poll_completion.constprop.0 [amdgpu]] *ERROR* MES failed to response msg=3
[drm:amdgpu_mes_unmap_legacy_queue [amdgpu]] *ERROR* failed to unmap legacy queue
[drm:mes_v11_0_submit_pkt_and_poll_completion.constprop.0 [amdgpu]] *ERROR* MES failed to response msg=3
[drm:amdgpu_mes_unmap_legacy_queue [amdgpu]] *ERROR* failed to unmap legacy queue
[drm:mes_v11_0_submit_pkt_and_poll_completion.constprop.0 [amdgpu]] *ERROR* MES failed to response msg=3
[drm:amdgpu_mes_unmap_legacy_queue [amdgpu]] *ERROR* failed to unmap legacy queue
[drm:gfx_v11_0_cp_gfx_enable.isra.0 [amdgpu]] *ERROR* failed to halt cp gfx
Dec 27 15:03:38 ciro-p14s kernel: amdgpu 0000:64:00.0: amdgpu: MODE2 reset
Dec 27 15:03:38 ciro-p14s kernel: amdgpu 0000:64:00.0: amdgpu: GPU reset succeeded, trying to resume
Dec 27 15:03:38 ciro-p14s kernel: [drm] PCIE GART of 512M enabled (table at 0x0000008000900
It appears to be a bug in the AMDGPU open source driver.
I think this was on Wayland. Possibly relatd but on X Window System, crashed the UI, showed message "oh no! Something has gone wrong."
2024-01-13_21-55-07@ciro@ciro-p14s$ cat /var/log/apport.log
ERROR: apport (pid 975172) 2024-01-13 21:41:02,087: host pid 3528 crashed in a separate mount namespace, ignoring
INFO: apport (pid 975227) 2024-01-13 21:41:02,398: called for pid 2728, signal 5, core limit 0, dump mode 1
INFO: apport (pid 975227) 2024-01-13 21:41:02,401: executable: /usr/bin/gnome-shell (command line "/usr/bin/gnome-shell")
INFO: apport (pid 975227) 2024-01-13 21:41:12,667: wrote report /var/crash/_usr_bin_gnome-shell.1000.crash
AWS Deep Learning Base GPU AMI (Ubuntu 20.04) by Ciro Santilli 35 Updated +Created
These come with pre-installed drivers, so e.g. nvidia-smi just works on them out of the box, tested on g5.xlarge which has an Nvidia A10G GPU. Good choice as a starting point for deep learning experiments.
3D ridig body dynamics benchmark by Ciro Santilli 35 Updated +Created
Bitcoin community by Ciro Santilli 35 Updated +Created
Bitcoin developer by Ciro Santilli 35 Updated +Created
Crate image with given text in ImageMagick by Ciro Santilli 35 Updated +Created
Digits 0 to 9, white on black background:
for i in `seq 0 9`; do convert -size 512x512 xc:black -pointsize 500 -gravity center -fill white -draw "text 0,0 \"$i\"" $i.png; done
IBM Spectrum LSF by Ciro Santilli 35 Updated +Created
OpenCourseWare by Ciro Santilli 35 Updated +Created
PhysX by Ciro Santilli 35 Updated +Created
Had hardware acceleration in mind from the very start, and for a long time that has meant GPU acceleration.
Laszlo's pizzas by Ciro Santilli 35 Updated +Created
On May 19, 2020, Lazlo announced on the Bitcoin Forum at: bitcointalk.org/index.php?topic=137.msg1195
I'll pay 10,000 Bitcoins for a couple of pizzas.. like maybe 2 large ones so I have some left over for the next day. I like having left over pizza to nibble on later. You can make the pizza yourself and bring it to my house or order it for me from a delivery place, but what I'm aiming for is getting food delivered in exchange for bitcoins where I don't have to order or prepare it myself, kind of like ordering a 'breakfast platter' at a hotel or something, they just bring you something to eat and you're happy!
I like things like onions, peppers, sausage, mushrooms, tomatoes, pepperoni, etc.. just standard stuff no weird fish topping or anything like that. I also like regular cheese pizzas which may be cheaper to prepare or otherwise acquire.
If you're interested please let me know and we can work out a deal.Ciro Santilli remembers his father always telling him how when Ciro was small, he would try to grasp the value of money by converting it into how many pizzas he could buy. Well, at least he was not alone.
User bitcoin2paysafe then asks the fundamental practical question:
In which country do you live?
and Lazslo replies:
Jacksonville, Florida
zip code 32224
United States
User ender_x then points out afterward:
10,000... Thats quite a bit.. you could sell those on www.bitcoinmarket.com/ for $41 USD right now..
so it is a slightly bad deal even then!
Three days later Lazlo's asks again on the thread:
So nobody wants to buy me pizza? Is the bitcoin amount I'm offering too low?
and one day later he confirms that the sale was made without naming the buyer:
I just want to report that I successfully traded 10,000 bitcoins for pizza
Thanks jercos!
where "jercos" is presumably the Bitcoin Forum username of the buyer. en.bitcoin.it/wiki/Jercos gives his identity as Jeremy Sturdivant.
www.thesun.co.uk/news/15049566/other-bitcoin-pizza-jeremy-sturdivant-fortune-hanyecz/ mentions Jeremy sold too early however:
The cryptocash disappeared when Sturdivant used it to "cover expenses" while travelling the US with his girlfriend.
Figure 1.
Laszlo's Papa's Specialty pizzas
. Source. The most famous of Laszlo's pizzas, originally published on his website: web.archive.org/web/20210217220810/http://heliacal.net/~solar/bitcoin/lightning-pizza/.
Figure 2.
Laszlo's secondary pizza event
. Source. web.archive.org/web/20210217220810/http://heliacal.net/~solar/bitcoin/lightning-pizza/ documents another pizza event, as we have different pizza boxes from the most widely known one: web.archive.org/web/20211219130004/http://heliacal.net/~solar/bitcoin/pizza/ Only image thumbs are archived however. web.archive.org/web/20211016070745/https://www.thesun.co.uk/news/15049566/other-bitcoin-pizza-jeremy-sturdivant-fortune-hanyecz/ however shows a large version that The Sun got their hands on before the takedown.
heliacal.net is presumably his personal website? But is was down as of 2023. But we have Wayback Machine archives of course :-) Latest working one of that page 2021: web.archive.org/web/20211219130004/http://heliacal.net/~solar/bitcoin/pizza/ And some other stalking:
Laszlo is truly, literally, the nerd who got very very very lucky!!!
On June 12, 2010 Laszlo re-offers:
This is an open offer by the way.. I will trade 10,000 BTC for 2 of these pizzas any time as long as I have the funds (I usually have plenty). If anyone is interested please let me know. The exchange is favorable for anyone who does it because the 2 pizzas are only about 25 dollars total, maybe 30 if you give the guy a nice tip. If you get me the upgraded extra large ones or something, I can throw in some more bitcoins, just let me know and we'll work something out.
My 1 year old daughter really enjoys pizza too! She just smears it all over her face if you give her a whole slice, but she does eventually manage to get most of it in her mouth (minus a few loose toppings of course).
and on August 4 user MoonShadow takes him up:
An open offer, you say? It's been a while since you had some pizza. Feeling a craving, Laszlo?
but finally Laszlo withdrawls the offer:
Well I didn't expect this to be so popular but I can't really afford to keep doing it since I can't generate thousands of coins a day anymore. Thanks to everyone who bought me pizza already but I'm kind of holding off on doing any more of these for now.
so we understand that the sales happened multiple times!!! Also, we understand that he was probably a miner.
TODO list all of the potential sales.
Nvidia Tesla by Ciro Santilli 35 Updated +Created
Install Conda on Ubuntu by Ciro Santilli 35 Updated +Created
Tested on Ubuntu 20.04:
mkdir -p ~/miniconda3
wget https://repo.anaconda.com/miniconda/Miniconda3-py311_23.11.0-2-Linux-x86_64.sh -O ~/miniconda3/miniconda.sh
bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3
rm -rf ~/miniconda3/miniconda.sh
~/miniconda3/bin/conda init bash
. ~/.bashrc
and from then on we can do conda commands normally.
At that time, the exact installer under latest appears to have been: repo.anaconda.com/miniconda/Miniconda3-py311_23.11.0-2-Linux-x86_64.sh
Terse RDF by Ciro Santilli 35 Updated +Created

Unlisted articles are being shown, click here to show only listed articles.