diff --git a/requirements.txt b/requirements.txt index f45766b8..d0c6017e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ torch torchvision safetensors -git+https://github.com/huggingface/diffusers.git +git+https://github.com/huggingface/diffusers.git@v0.30.1 transformers lycoris-lora==1.8.3 flatten_json @@ -32,4 +32,4 @@ sentencepiece huggingface_hub peft gradio -python-slugify \ No newline at end of file +python-slugify diff --git a/toolkit/buckets.py b/toolkit/buckets.py index 835c9eb9..0817b12c 100644 --- a/toolkit/buckets.py +++ b/toolkit/buckets.py @@ -140,6 +140,9 @@ def get_bucket_for_image_size( if bucket_size_list is None: # if real resolution is smaller, use that instead real_resolution = get_resolution(width, height) + # Make sure that resolution and real_resolution are integers + resolution = int(resolution) + real_resolution = int(real_resolution) resolution = min(resolution, real_resolution) bucket_size_list = get_bucket_sizes(resolution=resolution, divisibility=divisibility)