openvinotoolkit / stable-diffusion-webui

Stable Diffusion web UI
GNU Affero General Public License v3.0
247 stars 39 forks source link

Slow Torch import #88

Open Mirakurun opened 6 months ago

Mirakurun commented 6 months ago

Is there an existing issue for this?

What happened?

Torch takes more than 20 seconds to import when running in the cloud as a container (Google Cloud Run), but it only takes a few seconds when running locally on my PC. Why does it take so much longer?

Steps to reproduce the problem

  1. Create docker container
  2. Run in Google Cloud Run

What should have happened?

Run faster

Sysinfo

Ubuntu 24 GB RAM 6 vCPUs No GPU

What browsers do you use to access the UI ?

No response

Console logs

import torch: done in 10.942s

import torch: done in 11.085s

Startup time: 51.8s (prepare environment: 0.6s, import torch: 22.0s, import gradio: 4.6s, setup paths: 5.2s, initialize shared: 0.7s, other imports: 5.2s, setup codeformer: 0.7s, setup gfpgan: 0.2s, load scripts: 4.1s, initialize extra networks: 0.7s, create ui: 4.5s, gradio launch: 2.8s, add APIs: 0.4s)

Additional information

No response