Skip to content

Commit

Permalink
Add stable diffusion fp32 case
Browse files Browse the repository at this point in the history
  • Loading branch information
zhoujiamin01 committed Aug 31, 2023
1 parent f39b1f4 commit b95556a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 2 additions & 4 deletions inference/configs/stable_diffusion_v1_4/configurations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@ batch_size: 2
# Attention! For transformer decoder like bert, 1 token cause 2*param flops, so we need 2*length*params like 2*512*0.33B here
# format: a_1*a*2*...*a_nea_0,like 2*512*0.33e9(bert) or 4.12e9(resnet50)
flops: 6.78e11
fp16: false
compiler: tensorrt
num_workers: 8
log_freq: 5
repeat: 1
# skip validation(will also skip create_model, export onnx). Assert exist_onnx_path != null
no_validation: false
# set a real onnx_path to use exist, or set it to anything but null to avoid export onnx manually(like torch-tensorrt)
exist_onnx_path: null
exist_onnx_path: ../../onnxs/stable_diffusion_v1_4_bs2_pytorch_fp16False.onnx
# set a exist path of engine file like resnet50.trt/resnet50.plan/resnet50.engine
exist_compiler_path: null

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fp16: false
compiler: xtcl
no_validation: true
1 change: 0 additions & 1 deletion inference/inference_engine/kunlunxin/xtcl.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ def build_engine(self, config, onnx_path):
for input in onnx_model.graph.input:
input_shape = input.type.tensor_type.shape.dim
input_shape = [a.dim_value for a in input_shape]
input_shape[0] = config.batch_size
input_name = input.name #'inputs:0'
self.input_names.append(input_name)
shape_dict[input_name] = input_shape
Expand Down

0 comments on commit b95556a

Please sign in to comment.