Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -118,16 +118,16 @@ def model_main(args, master_port, rank, request_queue, response_queue, mp_barrie
|
|
118 |
dtype = {"bf16": torch.bfloat16, "fp16": torch.float16, "fp32": torch.float32}[args.precision]
|
119 |
|
120 |
text_encoder = AutoModel.from_pretrained(
|
121 |
-
gemma_path, torch_dtype=dtype, device_map="cuda", token=hf_token
|
122 |
).eval()
|
123 |
cap_feat_dim = text_encoder.config.hidden_size
|
124 |
if args.num_gpus > 1:
|
125 |
raise NotImplementedError("Inference with >1 GPUs not yet supported")
|
126 |
|
127 |
-
tokenizer = AutoTokenizer.from_pretrained(gemma_path, token=hf_token)
|
128 |
tokenizer.padding_side = "right"
|
129 |
|
130 |
-
vae = AutoencoderKL.from_pretrained(flux_path, subfolder="vae", token=hf_token).cuda()
|
131 |
|
132 |
print(f"Creating DiT: {train_args.model}")
|
133 |
|
|
|
118 |
dtype = {"bf16": torch.bfloat16, "fp16": torch.float16, "fp32": torch.float32}[args.precision]
|
119 |
|
120 |
text_encoder = AutoModel.from_pretrained(
|
121 |
+
gemma_path, torch_dtype=dtype, device_map="cuda", token=args.hf_token
|
122 |
).eval()
|
123 |
cap_feat_dim = text_encoder.config.hidden_size
|
124 |
if args.num_gpus > 1:
|
125 |
raise NotImplementedError("Inference with >1 GPUs not yet supported")
|
126 |
|
127 |
+
tokenizer = AutoTokenizer.from_pretrained(gemma_path, token=args.hf_token)
|
128 |
tokenizer.padding_side = "right"
|
129 |
|
130 |
+
vae = AutoencoderKL.from_pretrained(flux_path, subfolder="vae", token=args.hf_token).cuda()
|
131 |
|
132 |
print(f"Creating DiT: {train_args.model}")
|
133 |
|