Unverified Commit d07f7300 authored by Suraj Patil's avatar Suraj Patil Committed by GitHub
Browse files

Fix num images per prompt unclip (#1787)



* use repeat_interleave

* fix repeat

* Trigger Build

* don't install accelerate from main

* install released accelrate for mps test

* Remove additional accelerate installation from main.
Co-authored-by: default avatarPedro Cuenca <pedro@huggingface.co>
parent a6fb9407
...@@ -61,7 +61,6 @@ jobs: ...@@ -61,7 +61,6 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: | run: |
python -m pip install -e .[quality,test] python -m pip install -e .[quality,test]
python -m pip install git+https://github.com/huggingface/accelerate
python -m pip install -U git+https://github.com/huggingface/transformers python -m pip install -U git+https://github.com/huggingface/transformers
- name: Environment - name: Environment
...@@ -135,7 +134,6 @@ jobs: ...@@ -135,7 +134,6 @@ jobs:
${CONDA_RUN} python -m pip install --upgrade pip ${CONDA_RUN} python -m pip install --upgrade pip
${CONDA_RUN} python -m pip install -e .[quality,test] ${CONDA_RUN} python -m pip install -e .[quality,test]
${CONDA_RUN} python -m pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cpu ${CONDA_RUN} python -m pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cpu
${CONDA_RUN} python -m pip install git+https://github.com/huggingface/accelerate
- name: Environment - name: Environment
shell: arch -arch arm64 bash {0} shell: arch -arch arm64 bash {0}
......
...@@ -59,7 +59,6 @@ jobs: ...@@ -59,7 +59,6 @@ jobs:
run: | run: |
apt-get update && apt-get install libsndfile1-dev -y apt-get update && apt-get install libsndfile1-dev -y
python -m pip install -e .[quality,test] python -m pip install -e .[quality,test]
python -m pip install git+https://github.com/huggingface/accelerate
python -m pip install -U git+https://github.com/huggingface/transformers python -m pip install -U git+https://github.com/huggingface/transformers
- name: Environment - name: Environment
...@@ -127,7 +126,6 @@ jobs: ...@@ -127,7 +126,6 @@ jobs:
${CONDA_RUN} python -m pip install --upgrade pip ${CONDA_RUN} python -m pip install --upgrade pip
${CONDA_RUN} python -m pip install -e .[quality,test] ${CONDA_RUN} python -m pip install -e .[quality,test]
${CONDA_RUN} python -m pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cpu ${CONDA_RUN} python -m pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cpu
${CONDA_RUN} python -m pip install git+https://github.com/huggingface/accelerate
${CONDA_RUN} python -m pip install -U git+https://github.com/huggingface/transformers ${CONDA_RUN} python -m pip install -U git+https://github.com/huggingface/transformers
- name: Environment - name: Environment
......
...@@ -61,7 +61,6 @@ jobs: ...@@ -61,7 +61,6 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: | run: |
python -m pip install -e .[quality,test] python -m pip install -e .[quality,test]
python -m pip install git+https://github.com/huggingface/accelerate
python -m pip install -U git+https://github.com/huggingface/transformers python -m pip install -U git+https://github.com/huggingface/transformers
- name: Environment - name: Environment
...@@ -131,7 +130,6 @@ jobs: ...@@ -131,7 +130,6 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: | run: |
python -m pip install -e .[quality,test,training] python -m pip install -e .[quality,test,training]
python -m pip install git+https://github.com/huggingface/accelerate
python -m pip install -U git+https://github.com/huggingface/transformers python -m pip install -U git+https://github.com/huggingface/transformers
- name: Environment - name: Environment
......
...@@ -173,7 +173,7 @@ class UnCLIPPipeline(DiffusionPipeline): ...@@ -173,7 +173,7 @@ class UnCLIPPipeline(DiffusionPipeline):
uncond_text_encoder_hidden_states = uncond_text_encoder_hidden_states.view( uncond_text_encoder_hidden_states = uncond_text_encoder_hidden_states.view(
batch_size * num_images_per_prompt, seq_len, -1 batch_size * num_images_per_prompt, seq_len, -1
) )
uncond_text_mask = uncond_text_mask.repeat(1, num_images_per_prompt) uncond_text_mask = uncond_text_mask.repeat_interleave(num_images_per_prompt, dim=0)
# done duplicates # done duplicates
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment