Skip to content

Instantly share code, notes, and snippets.

View offchan42's full-sized avatar
🐳
Deep Learning with Generative AI

Chanchana Sornsoontorn offchan42

🐳
Deep Learning with Generative AI
View GitHub Profile
@offchan42
offchan42 / build_openvr_samples.md
Last active October 9, 2020 09:02
How to properly build OpenVR samples for Windows 10

Building OpenVR Samples

Here are suggestions for building the OpenVR samples for Windows 10:

  • The main thing to do to make sure you will not have too many problems is to use the exact same version of everything it asks you to do and strictly follow every advice.
  • Install VS 2013, even though the latest version is 2019. It will come with the appropriate build tool.
  • Install Qt which have MSVC2013, the old open source Qt version. You only need this MSVC2013 component. Nothing else is needed.
  • Build the project using VS 2013 (make sure to set Release), the latest command cmake --build . --target all --config Release doesn't work.

Here's the result for overlay sample: image

@offchan42
offchan42 / load_stable_diffusion_pipeline.py
Last active March 25, 2023 06:13
Load stable diffusion pipeline with model cache in google drive. Use in Colab
cache_dir = "/root/.cache/huggingface/hub"
!ln -fs /content/drive/MyDrive/huggingface_hub_cache $cache_dir
from diffusers import StableDiffusionPipeline
import torch
model_id = "runwayml/stable-diffusion-v1-5"
pipe = StableDiffusionPipeline.from_pretrained(model_id, cache_dir=cache_dir, torch_dtype=torch.float16)
pipe = pipe.to("cuda")