Tuesday, May 7, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 7366  / 1 Year ago, wed, may 31, 2023, 6:02:41

https://github.com/CompVis/stable-diffusion/


Does anyone have this working on 64-bit Ubuntu 22.04 LTS? Could you share steps on how to get it working, or just link to a known tested/working guide for same?


More From » python

 Answers
1

Got it. I'll write it up in case it helps another. This will initially only cover CPU "sampling" (generating an image) until I get GPU sampling working. Sampling should run entirely offline.


install with pip



  1. pip install --upgrade diffusers transformers scipy torch

  2. sudo apt install git-lfs

  3. clone the git repository at https://huggingface.co/runwayml/stable-diffusion-v1-5 (you have to log in or sign up first and accept their license agreement)


Then you can create a small Python script (inside your local working copy of the cloned git repo above) and run it to try sampling for yourself:


from diffusers import StableDiffusionPipeline
pipe = StableDiffusionPipeline.from_pretrained('.')
prompt = "a photo of an astronaut riding a horse on mars"
image = pipe(prompt).images[0]
image.save("astronaut_rides_horse.png")

easier and better method


https://github.com/invoke-ai/InvokeAI#installation


This provides a really nice web GUI, too.


onboard GPU note


My GPU shows up as Intel CometLake-S GT2 [UHD Graphics 630] from lspci | grep VGA or neofetch. screenfetch calls it Mesa Intel(R) UHD Graphics 630 (CML GT2). Either way I don't know how to use this GPU for sampling (or if it is even possible).


[#176] Wednesday, May 31, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
reangi

Total Points: 213
Total Questions: 102
Total Answers: 114

Location: Namibia
Member since Wed, Jan 19, 2022
2 Years ago
reangi questions
Wed, Jun 29, 22, 09:36, 2 Years ago
Tue, Nov 29, 22, 12:04, 1 Year ago
Sun, Apr 9, 23, 22:26, 1 Year ago
;