1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 fetchpatch, 6 einops, 7 emoji, 8 flax, 9 ftfy, 10 jax, 11 jaxlib, 12 pillow, 13 transformers, 14 unidecode, 15 wandb, 16}: 17 18buildPythonPackage rec { 19 pname = "dalle-mini"; 20 version = "0.1.5"; 21 format = "setuptools"; 22 23 src = fetchPypi { 24 inherit pname version; 25 hash = "sha256-k4XILjNNz0FPcAzwPEeqe5Lj24S2Y139uc9o/1IUS1c="; 26 }; 27 28 # Fix incompatibility with the latest JAX versions 29 # See https://github.com/borisdayma/dalle-mini/pull/338 30 patches = [ 31 (fetchpatch { 32 url = "https://github.com/borisdayma/dalle-mini/pull/338/commits/22ffccf03f3e207731a481e3e42bdb564ceebb69.patch"; 33 hash = "sha256-LIOyfeq/oVYukG+1rfy5PjjsJcjADCjn18x/hVmLkPY="; 34 }) 35 ]; 36 37 propagatedBuildInputs = [ 38 einops 39 emoji 40 flax 41 ftfy 42 jax 43 jaxlib 44 pillow 45 transformers 46 unidecode 47 wandb 48 ]; 49 50 doCheck = false; # no upstream tests 51 52 pythonImportsCheck = [ "dalle_mini" ]; 53 54 meta = with lib; { 55 description = "Generate images from a text prompt"; 56 homepage = "https://github.com/borisdayma/dalle-mini"; 57 license = licenses.asl20; 58 maintainers = with maintainers; [ r-burns ]; 59 }; 60}