Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions examples/text_to_image/train_text_to_image_flax.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,11 +371,11 @@ def collate_fn(examples):
train_dataset, shuffle=True, collate_fn=collate_fn, batch_size=total_train_batch_size, drop_last=True
)

weight_dtype = torch.float32
weight_dtype = jnp.float32
if args.mixed_precision == "fp16":
weight_dtype = torch.float16
weight_dtype = jnp.float16
elif args.mixed_precision == "bf16":
weight_dtype = torch.bfloat16
weight_dtype = jnp.bfloat16

# Load models and create wrapper for stable diffusion
tokenizer = CLIPTokenizer.from_pretrained(args.pretrained_model_name_or_path, subfolder="tokenizer")
Expand Down