Update src/pipeline.py
Browse files12 unmodified lines1314151617181910 unmodified lines3031323334353612 unmodified linesimport gcfrom diffusers import FluxTransformer2DModel, DiffusionPipelinefrom torchao.quantization import quantize_,int8_weight_onlyos.environ["TOKENIZERS_PARALLELISM"] = "True"os.environ["PYTORCH_CUDA_ALLOC_CONF"] = "expandable_segments:True"Pipeline = None10 unmodified linesdtype, device = torch.bfloat16, "cuda"vae = AutoencoderTiny.from_pretrained("aifeifei798/taef1", torch_dtype=dtype)quantize_(vae, int8_weight_only())model = FluxTransformer2DModel.from_pretrained("slobers/transgender", torch_dtype=dtype, use_safetensors=False)pipeline = DiffusionPipeline.from_pretrained(ckpt_id, vae=vae, transformer=model, torch_dtype=dtype,)torch.backends.cudnn.benchmark = Truetorch.backends.cuda.matmul.allow_tf32 = True12 unmodified lines1314151617181910 unmodified lines3031323334353612 unmodified linesimport gcfrom diffusers import FluxTransformer2DModel, DiffusionPipelinefrom torchao.quantization import quantize_,int8_weight_onlyHOME = os.environ["HOME"]os.environ["TOKENIZERS_PARALLELISM"] = "True"os.environ["PYTORCH_CUDA_ALLOC_CONF"] = "expandable_segments:True"Pipeline = None10 unmodified linesdtype, device = torch.bfloat16, "cuda"vae = AutoencoderTiny.from_pretrained("aifeifei798/taef1", torch_dtype=dtype)quantize_(vae, int8_weight_only())model = FluxTransformer2DModel.from_pretrained(f"{HOME}/.cache/huggingface/hub/models--slobers--transgender/snapshots/cb99836efa0ed55856970269c42fafdaa0e44c5d", torch_dtype=dtype, use_safetensors=False)pipeline = DiffusionPipeline.from_pretrained(ckpt_id, vae=vae, transformer=model, torch_dtype=dtype,)torch.backends.cudnn.benchmark = Truetorch.backends.cuda.matmul.allow_tf32 = True
src/pipeline.py+2-2