(assets) move 'caution.png' to avoid including entire 'assets' dir in the wheel

reduces wheel size to 3MB from 27MB
This commit is contained in:
Eugene Brodsky 2023-01-28 15:35:20 -05:00
parent ebe6daac56
commit 47dbe7bc0d
4 changed files with 4 additions and 5 deletions

View File

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

View File

@ -21,7 +21,7 @@ from ldm.models.diffusion.cross_attention_map_saving import AttentionMapSaver
from ldm.util import rand_perlin_2d
downsampling = 8
CAUTION_IMG = 'assets/caution.png'
CAUTION_IMG = 'assets/web/caution.png'
class CkptGenerator():
def __init__(self, model, precision):

View File

@ -23,7 +23,7 @@ from ldm.models.diffusion.ddpm import DiffusionWrapper
from ldm.util import rand_perlin_2d
downsampling = 8
CAUTION_IMG = 'assets/caution.png'
CAUTION_IMG = 'assets/web/caution.png'
class Generator:
downsampling_factor: int
@ -345,4 +345,3 @@ class Generator:
def torch_dtype(self)->torch.dtype:
return torch.float16 if self.precision == 'float16' else torch.float32

View File

@ -108,10 +108,10 @@ version = { attr = "ldm.invoke.__version__" }
[tool.setuptools.packages.find]
"where" = ["."]
"include" = ["assets", "backend*", "frontend.dist*", "ldm*"]
"include" = ["assets.web*", "backend*", "frontend.dist*", "ldm*"]
[tool.setuptools.package-data]
"assets" = ["caution.png"]
"assets.web" = ["**.png"]
"backend" = ["**.png"]
"frontend.dist" = ["**"]