Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -75,7 +75,7 @@ def encode_prompt(prompt_batch, text_encoder, tokenizer, proportion_empty_prompt
|
|
| 75 |
return_tensors="pt",
|
| 76 |
)
|
| 77 |
|
| 78 |
-
|
| 79 |
text_input_ids = text_inputs.input_ids
|
| 80 |
prompt_masks = text_inputs.attention_mask
|
| 81 |
|
|
@@ -125,7 +125,7 @@ def model_main(args, master_port, rank, request_queue, response_queue, mp_barrie
|
|
| 125 |
if args.num_gpus > 1:
|
| 126 |
raise NotImplementedError("Inference with >1 GPUs not yet supported")
|
| 127 |
|
| 128 |
-
tokenizer = AutoTokenizer.from_pretrained("google/gemma-2-2b", token=hf_token)
|
| 129 |
tokenizer.padding_side = "right"
|
| 130 |
|
| 131 |
vae = AutoencoderKL.from_pretrained("black-forest-labs/FLUX.1-dev", subfolder="vae", token=hf_token).cuda()
|
|
|
|
| 75 |
return_tensors="pt",
|
| 76 |
)
|
| 77 |
|
| 78 |
+
print(f"Text Encoder Device: {text_encoder.device}")
|
| 79 |
text_input_ids = text_inputs.input_ids
|
| 80 |
prompt_masks = text_inputs.attention_mask
|
| 81 |
|
|
|
|
| 125 |
if args.num_gpus > 1:
|
| 126 |
raise NotImplementedError("Inference with >1 GPUs not yet supported")
|
| 127 |
|
| 128 |
+
tokenizer = AutoTokenizer.from_pretrained("google/gemma-2-2b", token=hf_token)
|
| 129 |
tokenizer.padding_side = "right"
|
| 130 |
|
| 131 |
vae = AutoencoderKL.from_pretrained("black-forest-labs/FLUX.1-dev", subfolder="vae", token=hf_token).cuda()
|