Skip to content

Instantly share code, notes, and snippets.

View mchaker's full-sized avatar

M mchaker

View GitHub Profile
@mchaker
mchaker / stable-diffusion-links_hosted.md
Last active September 10, 2022 22:55
stable-diffusion-links: hosted environments
@mchaker
mchaker / stable-diffusion-links_guides.md
Last active September 14, 2022 12:48
stable-diffusion-links: guides
@mchaker
mchaker / stable-diffusion-links_webuis.md
Last active September 24, 2022 12:55
stable-diffusion-links: web UIs
@mchaker
mchaker / stable-diffusion-links_finetunes.md
Last active September 10, 2022 22:12
stable-diffusion-links: finetunes
@mchaker
mchaker / links-sd.md
Last active September 11, 2022 00:46
Stable Diffusion Links INDEX
@mchaker
mchaker / improve-stablediffusion-pipeline-mem-mgmt.py
Created September 6, 2022 09:58 — forked from fladdict/gist:2115eb7ea32c9245e4f45642553aa3e9
Improve Diffuser Pipeline / StableDiffusion Memory Management
pipe = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", revision="fp16", torch_dtype=torch.float16, use_auth_token=True)
pipe = pipe.to("cuda")
img2imgPipe = StableDiffusionImg2ImgPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", revision="fp16", torch_dtype=torch.float16, use_auth_token=True)
img2imgPipe = img2imgPipe.to("cuda")
inpaintingPipe = StableDiffusionInpaintingPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", revision="fp16", torch_dtype=torch.float16, use_auth_token=True)
inpaintingPipe = inpaintingPipe.to("cuda")
@mchaker
mchaker / stable-diffusion-links.md
Last active July 28, 2024 23:57
stable-diffusion-links: useful optimizations

Keybase proof

I hereby claim:

  • I am mchaker on github.
  • I am mchaker (https://keybase.io/mchaker) on keybase.
  • I have a public key whose fingerprint is 3C85 3A1F 55F6 7A35 6B32 11A2 98ED 8FCB EB8F FA76

To claim this, I am signing this object:

@mchaker
mchaker / _Google Analytics 4 with Hugo.md
Last active April 20, 2022 23:56 — forked from zjeaton/_Google Analytics 4 with Hugo.md
Google Analytics 4 (with Measurement ID) in Hugo

Google Analytics 4 in Hugo

Blog post with slightly more detail can be found here. If you want to just get to it, read on.

I (very) recently decided to reimplement GA in my site, and found that existing implementation in Hugo was not compatible with GA4's new Measurement ID. This is an easy way to drop your Measurement ID into your site. I'm not going to go into how to sign up for GA.

This implementation requires that you create a site parameter for analytics, create a partial, and call the partial. I tweaked the names of the parameters and files so they didn't collide with the built-in hugo code.

Place the GoogleAnalyicsID (Measurement ID) in config.toml within [params].

To install tcptraceroute on Debian/Ubuntu:

$ sudo apt-get install tcptraceroute

To install tcptraceroute on CentOS/REHL, first set up RepoForge on your system, and then:

$ sudo yum install tcptraceroute