Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/batched image generation #34

Merged
merged 8 commits into from
Feb 22, 2024
Merged

Conversation

sokovninn
Copy link
Member

Added batched image generation

Some benchmarks (NVIDIA L4 24GB GPU):

SDXL-Turbo (~6x speed up):

  • 1000 images batch_size=1: 68 min (7.1 GB)
  • 1000 images batch_size=2: 37 min (8.1 GB)
  • 1000 images batch_size=4: 22 min (11.5 GB)
  • 1000 images batch_size=8: 15 min (17.6 GB)
  • 1000 images batch_size=16 (max): 11 min (21.2 GB)

The time for 10k images reduced to <2h.

SDXL (almost no speed up for some reason)

  • 100 images batch_size=1: 60 min
  • 100 images batch_size=4 (max): 55 min

SDXL-Turbo on CPU:

  • 100 images batch_size=1: 48 min
  • 100 images batch_size=16: 60 min

Copy link

github-actions bot commented Feb 20, 2024

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
799 375 47% 0% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
datadreamer/image_generation/clip_image_tester.py 52% 🟢
datadreamer/image_generation/image_generator.py 25% 🟢
datadreamer/image_generation/sdxl_image_generator.py 20% 🟢
datadreamer/image_generation/sdxl_turbo_image_generator.py 26% 🟢
datadreamer/pipelines/generate_dataset_from_scratch.py 43% 🟢
datadreamer/prompt_generation/lm_prompt_generator.py 58% 🟢
datadreamer/prompt_generation/tinyllama_lm_prompt_generator.py 82% 🟢
TOTAL 44% 🟢

updated for commit: 9f12c57 by action🐍

Copy link

Test Results

  6 files    6 suites   46m 59s ⏱️
 71 tests  29 ✅  42 💤 0 ❌
426 runs  174 ✅ 252 💤 0 ❌

Results for commit 9f12c57.

Copy link
Contributor

@HonzaCuhel HonzaCuhel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sokovninn sokovninn merged commit 6d313af into dev Feb 22, 2024
9 checks passed
sokovninn added a commit that referenced this pull request Mar 2, 2024
* feature: add batched image generation

* test: modify image generation tests

* fix: modify examples

* fix: prompt objects weights

* docs: update args description

* docs: update prompt generation docstrings

* [Automated] Updated coverage badge

---------

Co-authored-by: GitHub Actions <[email protected]>
@sokovninn sokovninn deleted the feature/batched-image-generation branch March 7, 2024 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants