Skip to content

Commit

Permalink
Modify mode for dynamic shape in README (#943)
Browse files Browse the repository at this point in the history
  • Loading branch information
lixiang007666 authored Jun 11, 2024
1 parent 7487bb2 commit 016bfc9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/onediff/infer_compiler/backends/nexfort/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,25 +47,25 @@ Onediff's nexfort backend also supports out-of-the-box dynamic shape inference.

Test SDXL:
```
# The best practice mode configuration for dynamic shape is `max-optimize:max-autotune:freezing`.
# The best practice mode configuration for dynamic shape is `max-optimize:max-autotune:low-precision`.
python3 ./onediff_diffusers_extensions/examples/text_to_image_sdxl.py \
--height 512 \
--width 768 \
--compiler nexfort \
--compiler-config '{"mode": "max-optimize:max-autotune:freezing", "memory_format": "channels_last", "dynamic": true}' \
--compiler-config '{"mode": "max-optimize:max-autotune:low-precision", "memory_format": "channels_last", "dynamic": true}' \
--run_multiple_resolutions 1 \
--run_rare_resolutions 1
```

Test PixArt alpha:
```
python3 ./benchmarks/text_to_image.py \
--model /data/hf_models/PixArt-XL-2-1024-MS/ \
--model PixArt-alpha/PixArt-XL-2-1024-MS \
--scheduler none \
--steps 20 \
--height 512 \
--width 768 \
--compiler nexfort \
--compiler-config '{"mode": "max-optimize:max-autotune:freezing", "memory_format": "channels_last", "dynamic": true}' \
--compiler-config '{"mode": "max-optimize:max-autotune:low-precision", "memory_format": "channels_last", "dynamic": true}' \
--run_multiple_resolutions 1
```

0 comments on commit 016bfc9

Please sign in to comment.