Skip to content

Commit 6feb2b5

Browse files
committed
Cast to float32
1 parent f2960c3 commit 6feb2b5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ppdiffusers/deploy/text_guided_img_to_img_infer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ def create_trt_runtime(model_dir, model_prefix, model_format, workspace=(1 << 31
266266
text_encoder_runtime = create_paddle_inference_runtime(
267267
args.model_dir,
268268
args.text_encoder_model_prefix,
269-
False, # use_trt
269+
use_trt,
270270
text_encoder_shape,
271271
use_fp16=args.use_fp16,
272272
device_id=device_id,

ppdiffusers/ppdiffusers/pipelines/stable_diffusion/pipeline_fastdeploy_cycle_diffusion.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ def __call__(
639639
# )
640640
concat_noise_pred = self.unet(
641641
sample=concat_latent_model_input.numpy(),
642-
timestep=t.numpy(),
642+
timestep=t.cast("float32").numpy(),
643643
encoder_hidden_states=concat_prompt_embeds.numpy(),
644644
)[0]
645645
concat_noise_pred = paddle.to_tensor(concat_noise_pred)

0 commit comments

Comments
 (0)