Remove redundant
Browse files- src/pipeline.py +4 -12
src/pipeline.py
CHANGED
@@ -10,20 +10,15 @@ from pipelines.models import TextToImageRequest
|
|
10 |
from torch import Generator
|
11 |
from torchao.quantization import quantize_, int8_weight_only
|
12 |
from transformers import T5EncoderModel, CLIPTextModel, logging
|
13 |
-
|
14 |
-
# torch._dynamo.config.suppress_errors = True
|
15 |
|
16 |
Pipeline: TypeAlias = FluxPipeline
|
17 |
|
18 |
torch.backends.cudnn.benchmark = True
|
19 |
-
torch._inductor.config.conv_1x1_as_mm = True
|
20 |
-
torch._inductor.config.coordinate_descent_tuning = True
|
21 |
-
torch._inductor.config.epilogue_fusion = False
|
22 |
-
torch._inductor.config.coordinate_descent_check_all_directions = True
|
23 |
-
|
24 |
|
25 |
os.environ['PYTORCH_CUDA_ALLOC_CONF']="expandable_segments:True"
|
26 |
os.environ["TOKENIZERS_PARALLELISM"] = "True"
|
|
|
27 |
CHECKPOINT = "jokerbit/flux.1-schnell-Robert-int8wo"
|
28 |
REVISION = "5ef0012f11a863e5111ec56540302a023bc8587b"
|
29 |
|
@@ -47,11 +42,8 @@ def load_pipeline() -> Pipeline:
|
|
47 |
torch_dtype=torch.bfloat16,
|
48 |
).to("cuda")
|
49 |
quantize_(pipeline.vae, int8_weight_only())
|
50 |
-
|
51 |
-
pipeline.transformer.to(memory_format=torch.channels_last)
|
52 |
-
# pipeline.vae.to(memory_format=torch.channels_last)
|
53 |
-
|
54 |
-
# quantize_(pipeline.vae, int8_weight_only())
|
55 |
|
56 |
PROMPT = 'semiconformity, peregrination, quip, twineless, emotionless, tawa, depickle'
|
57 |
with torch.inference_mode():
|
|
|
10 |
from torch import Generator
|
11 |
from torchao.quantization import quantize_, int8_weight_only
|
12 |
from transformers import T5EncoderModel, CLIPTextModel, logging
|
13 |
+
|
|
|
14 |
|
15 |
Pipeline: TypeAlias = FluxPipeline
|
16 |
|
17 |
torch.backends.cudnn.benchmark = True
|
|
|
|
|
|
|
|
|
|
|
18 |
|
19 |
os.environ['PYTORCH_CUDA_ALLOC_CONF']="expandable_segments:True"
|
20 |
os.environ["TOKENIZERS_PARALLELISM"] = "True"
|
21 |
+
|
22 |
CHECKPOINT = "jokerbit/flux.1-schnell-Robert-int8wo"
|
23 |
REVISION = "5ef0012f11a863e5111ec56540302a023bc8587b"
|
24 |
|
|
|
42 |
torch_dtype=torch.bfloat16,
|
43 |
).to("cuda")
|
44 |
quantize_(pipeline.vae, int8_weight_only())
|
45 |
+
pipeline.to(memory_format=torch.channels_last)
|
46 |
+
# pipeline.transformer.to(memory_format=torch.channels_last)
|
|
|
|
|
|
|
47 |
|
48 |
PROMPT = 'semiconformity, peregrination, quip, twineless, emotionless, tawa, depickle'
|
49 |
with torch.inference_mode():
|