Skip to content

Commit

Permalink
Revert "feat: clip as external executor (#74)"
Browse files Browse the repository at this point in the history
This reverts commit 55a379e.
  • Loading branch information
delgermurun committed Aug 8, 2022
1 parent 55a379e commit df12eeb
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 817 deletions.
2 changes: 1 addition & 1 deletion .github/flow.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 0 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# OS
.DS_Store

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down Expand Up @@ -130,6 +127,3 @@ dmypy.json

# Pyre type checker
.pyre/

# Jina
.jina/
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ RUN apt-get update \
RUN if [ -n "${APT_PACKAGES}" ]; then apt-get update && apt-get install --no-install-recommends -y ${APT_PACKAGES}; fi && \
git clone --depth=1 https://github.com/JingyunLiang/SwinIR.git && \
git clone --depth=1 https://github.com/CompVis/latent-diffusion.git && \
git clone --depth=1 https://github.com/jina-ai/glid-3-xl.git && \
git clone --depth=1 https://github.com/hanxiao/glid-3-xl.git && \
pip install jax[cuda11_cudnn82]==0.3.13 -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html && \
pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu113 && \
cd latent-diffusion && pip install --timeout=1000 -e . && cd - && \
Expand Down
8 changes: 1 addition & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ DALL路E Flow is in client-server architecture.

## Updates

- 鈿狅笍 **2022/8/8** Started using CLIP-as-servive as an [external executor](https://docs.jina.ai/fundamentals/flow/add-executors/#external-executors). Now you can easily [deploy your own CLIP executor](#run-your-own-clip) if you want. There is [a small breaking change](https://github.com/jina-ai/dalle-flow/pull/74/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R103) as a result of this improvement, so [please _reopen_ the notebook in Google Colab](https://colab.research.google.com/github/jina-ai/dalle-flow/blob/main/client.ipynb).
- 鈿狅笍 **2022/7/6** Demo server migration to AWS EKS for better availability and robustness, **server URL is now changing to `grpcs://dalle-flow.dev.jina.ai`**. All connections are now with TLS encryption, [please _reopen_ the notebook in Google Colab](https://colab.research.google.com/github/jina-ai/dalle-flow/blob/main/client.ipynb).
- 鈿狅笍 **2022/6/25** Unexpected downtime between 6/25 0:00 - 12:00 CET due to out of GPU quotas. The new server now has 2 GPUs, add healthcheck in client notebook.
- **2022/6/3** Reduce default number of images to 2 per pathway, 4 for diffusion.
Expand Down Expand Up @@ -100,7 +99,6 @@ The 16 candidates are sorted by [CLIP-as-service](https://github.com/jina-ai/cli
```python
fav_id = 3
fav = da[fav_id]
fav.embedding = da.embedding
fav.display()
```

Expand Down Expand Up @@ -245,7 +243,7 @@ mkdir dalle && cd dalle
git clone https://github.com/jina-ai/dalle-flow.git
git clone https://github.com/JingyunLiang/SwinIR.git
git clone https://github.com/CompVis/latent-diffusion.git
git clone https://github.com/jina-ai/glid-3-xl.git
git clone https://github.com/hanxiao/glid-3-xl.git
```

You should have the following folder structure:
Expand Down Expand Up @@ -316,10 +314,6 @@ Congrats! Now you should be able to [run the client](#client).

You can modify and extend the server flow as you like, e.g. changing the model, adding persistence, or even auto-posting to Instagram/OpenSea. With Jina and DocArray, you can easily make DALL路E Flow [cloud-native and ready for production](https://github.com/jina-ai/jina).

### Run your own CLIP

By default [`CLIPTorchEncoder`](https://hub.jina.ai/executor/gzpbl8jh) runs as an [external executor](https://docs.jina.ai/fundamentals/flow/add-executors/#external-executors).
If you want to run your own CLIP, you can do that by just changing `external: true` to `external: false` in [`flow.yml`](./flow.yml).

<!-- start support-pitch -->
## Support
Expand Down
1 change: 0 additions & 1 deletion client.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,6 @@
"fav_id = 3\n",
"\n",
"fav = da[fav_id]\n",
"fav.embedding = da.embedding\n",
"\n",
"fav.display()"
]
Expand Down
2 changes: 1 addition & 1 deletion executors/dalle/executor/dalle.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


class DalleGenerator(Executor):
@requests
@requests(on='/')
def generate(self, docs: DocumentArray, parameters: Dict, **kwargs):

# can be of course larger but to save time and reduce the queue when serving public
Expand Down

0 comments on commit df12eeb

Please sign in to comment.