livepeer / ai-worker

https://livepeer.ai
MIT License
17 stars 26 forks source link

Onediff Support #149

Closed lukiod closed 2 months ago

lukiod commented 3 months ago

As for What i did i added an onediff optimization support under which i made some changes in the following files Issue Posted Upon

https://github.com/livepeer/bounties/issues/37

File Changes

  1. DockerFile - Added onediff and now repo works on torch 2.3.0 with other libs on
  2. pipelines/text-to-image.py
  3. routes/text-to-image.py
  4. bench.py - make it optimized for adding multiple optimization

How to run this

  1. Download all the model as mention in readme.md under runner dir
  2. Build the docker image docker build -t ai-runner-benchmark .
  3. Run the bench.py docker run --gpus all -v ./models:/models ai-runner-benchmark:latest python bench.py --pipeline text-to-image --model_id SG161222/RealVisXL_V4.0_Lightning --runs 3 --batch_size 1 --num_inference_steps 10 --optimization onediff
lukiod commented 2 months ago

@rickstaa please reopen it i did something and now this has been closed somehow

rickstaa commented 2 months ago

Replaced by https://github.com/livepeer/ai-worker/pull/182.