Skip to content

Commit

Permalink
Revert "Add dalle2-laion to inference engine (jina-ai#72)" (jina-ai#73)
Browse files Browse the repository at this point in the history
This reverts commit 3e2826d.
  • Loading branch information
delgermurun authored Aug 3, 2022
1 parent 3e2826d commit cc3586a
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 81 deletions.
3 changes: 0 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,11 @@ RUN if [ -n "${APT_PACKAGES}" ]; then apt-get update && apt-get install --no-ins
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/hanxiao/glid-3-xl.git && \
git clone --depth=1 https://github.com/LAION-AI/dalle2-laion && \
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 && \
pip install dalle2-pytorch==1.0.3 && \
cd latent-diffusion && pip install --timeout=1000 -e . && cd - && \
cd glid-3-xl && pip install --timeout=1000 -e . && cd - && \
cd dalle-flow && pip install --timeout=1000 --compile -r requirements.txt && cd - && \
cd dalle2-laion && pip install --timeout=1000 -e . && cd - && \
cd glid-3-xl && \
wget -q https://dall-3.com/models/glid-3-xl/bert.pt && \
wget -q https://dall-3.com/models/glid-3-xl/kl-f8.pt && \
Expand Down
11 changes: 1 addition & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@



DALL·E Flow is an interactive workflow for generating high-definition images from text prompt. First, it leverages [DALL·E-Mega](https://github.com/borisdayma/dalle-mini) and [DALL·E2-LAION](https://github.com/LAION-AI/dalle2-laion) to generate image candidates, and then calls [CLIP-as-service](https://github.com/jina-ai/clip-as-service) to rank the candidates w.r.t. the prompt. The preferred candidate is fed to [GLID-3 XL](https://github.com/Jack000/glid-3-xl) for diffusion, which often enriches the texture and background. Finally, the candidate is upscaled to 1024x1024 via [SwinIR](https://github.com/JingyunLiang/SwinIR).
DALL·E Flow is an interactive workflow for generating high-definition images from text prompt. First, it leverages [DALL·E-Mega](https://github.com/borisdayma/dalle-mini) to generate image candidates, and then calls [CLIP-as-service](https://github.com/jina-ai/clip-as-service) to rank the candidates w.r.t. the prompt. The preferred candidate is fed to [GLID-3 XL](https://github.com/Jack000/glid-3-xl) for diffusion, which often enriches the texture and background. Finally, the candidate is upscaled to 1024x1024 via [SwinIR](https://github.com/JingyunLiang/SwinIR).

DALL·E Flow is built with [Jina](https://github.com/jina-ai/jina) in a client-server architecture, which gives it high scalability, non-blocking streaming, and a modern Pythonic interface. Client can interact with the server via gRPC/Websocket/HTTP with TLS.

Expand All @@ -29,7 +29,6 @@ DALL·E Flow is in client-server architecture.

## Updates

- 🌟 **2022/7/29** Added dalle2-laion to inference engine
- ⚠️ **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 @@ -245,7 +244,6 @@ 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/hanxiao/glid-3-xl.git
git clone https://github.com/LAION-AI/dalle2-laion
```

You should have the following folder structure:
Expand All @@ -264,13 +262,6 @@ dalle/
```bash
cd latent-diffusion && pip install -e . && cd -
cd glid-3-xl && pip install -e . && cd -
cd dalle2-laion && pip install -e . && cd -
```

Install DALLE2-pytorch:

```bash
pip install dalle2-pytorch==1.0.3
```

There are couple models we need to download for GLID-3-XL:
Expand Down
57 changes: 0 additions & 57 deletions executors/dalle2/executor.py

This file was deleted.

12 changes: 1 addition & 11 deletions flow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,6 @@ executors:
CUDA_VISIBLE_DEVICES: 0 # change this if you have multiple GPU
XLA_PYTHON_CLIENT_ALLOCATOR: platform # https://jax.readthedocs.io/en/latest/gpu_memory_allocation.html
replicas: 1 # change this if you have larger VRAM
- name: dalle2
uses: Dalle2Generator
timeout_ready: -1 # Give time to download
py_modules:
- executors/dalle2/executor.py
env:
CUDA_VISIBLE_DEVICES: 0 # change this if you have multiple GPU
XLA_PYTHON_CLIENT_ALLOCATOR: platform # https://jax.readthedocs.io/en/latest/gpu_memory_allocation.html
replicas: 1 # change this if you have larger VRAM
needs: [gateway]
- name: diffusion
uses: GLID3Diffusion
uses_with:
Expand All @@ -41,7 +31,7 @@ executors:
clip_server: grpcs://demo-cas.jina.ai:2096
py_modules:
- executors/rerank/executor.py
needs: [dalle, dalle2, diffusion]
needs: [dalle, diffusion]
- name: upscaler
uses: SwinIRUpscaler
py_modules:
Expand Down

0 comments on commit cc3586a

Please sign in to comment.