Skip to content

Commit

Permalink
quanto: restrict on controlnet training to just base model
Browse files Browse the repository at this point in the history
  • Loading branch information
bghira committed Aug 21, 2024
1 parent 5b1c6a4 commit 3d988e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions train.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,15 +610,15 @@ def main():
logger.info("Initializing controlnet weights from unet")
controlnet = ControlNetModel.from_unet(unet)
if "quanto" in args.base_model_precision:
# we'll quantise pretty much everything but the adapter, if we execute this here.
# since controlnet training uses no adapter currently, we just quantise the base transformer here.
with accelerator.local_main_process_first():
quantoise(
unet=unet,
transformer=transformer,
text_encoder_1=text_encoder_1,
text_encoder_2=text_encoder_2,
text_encoder_3=text_encoder_3,
controlnet=controlnet,
controlnet=None,
args=args,
)

Expand Down

0 comments on commit 3d988e2

Please sign in to comment.