Skip to content

Commit

Permalink
[fix] fix the path typo for google/mt5-xxl in gradio_web_server.py (#405
Browse files Browse the repository at this point in the history
)

* [fix] fix the path typo for google/mt5-xxl in gradio_web_server.py

* [fix] fix the issue: the cache of pretrained mt5-xxl weights is inconsistent.

---------

Co-authored-by: guangyi <[email protected]>
  • Loading branch information
guangyliu and guangyi committed Aug 23, 2024
1 parent de7fc31 commit 294993c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions opensora/serve/gradio_web_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ def apply_style(style_name: str, positive: str, negative: str = "") -> Tuple[str
# text_encoder = MT5EncoderModel.from_pretrained(args.text_encoder_name, cache_dir=args.cache_dir,
# low_cpu_mem_usage=True, torch_dtype=weight_dtype)
# tokenizer = AutoTokenizer.from_pretrained(args.text_encoder_name, cache_dir=args.cache_dir)
text_encoder = MT5EncoderModel.from_pretrained("/storage/ongoing/new/Open-Sora-Plan/cache_dir/mt5-xxl", cache_dir=args.cache_dir,
text_encoder = MT5EncoderModel.from_pretrained("google/mt5-xxl", cache_dir=args.cache_dir,
low_cpu_mem_usage=True, torch_dtype=weight_dtype)
tokenizer = AutoTokenizer.from_pretrained("/storage/ongoing/new/Open-Sora-Plan/cache_dir/mt5-xxl", cache_dir=args.cache_dir)
tokenizer = AutoTokenizer.from_pretrained("google/mt5-xxl", cache_dir=args.cache_dir)
transformer = OpenSoraT2V.from_pretrained(args.model_path, cache_dir=args.cache_dir, low_cpu_mem_usage=False,
device_map=None, torch_dtype=weight_dtype)
scheduler = EulerAncestralDiscreteScheduler()
Expand Down
2 changes: 1 addition & 1 deletion scripts/text_condition/gpu/sample_t2v.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ CUDA_VISIBLE_DEVICES=7 python opensora/sample/sample_t2v.py \
--num_frames 29 \
--height 480 \
--width 640 \
--cache_dir "../cache_dir" \
--cache_dir "./cache_dir" \
--text_encoder_name google/mt5-xxl \
--text_prompt examples/prompt_list_0.txt \
--ae CausalVAEModel_D4_4x8x8 \
Expand Down
2 changes: 1 addition & 1 deletion scripts/text_condition/gpu/sample_t2v_ddp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ torchrun --nnodes=1 --nproc_per_node 8 --master_port 29503 \
--num_frames 93 \
--height 720 \
--width 1280 \
--cache_dir "../cache_dir" \
--cache_dir "./cache_dir" \
--text_encoder_name google/mt5-xxl \
--text_prompt examples/prompt_list_0.txt \
--ae CausalVAEModel_D4_4x8x8 \
Expand Down
2 changes: 1 addition & 1 deletion scripts/text_condition/gpu/sample_t2v_sp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ torchrun --nnodes=1 --nproc_per_node 8 --master_port 29503 \
--num_frames 93 \
--height 720 \
--width 1280 \
--cache_dir "../cache_dir" \
--cache_dir "./cache_dir" \
--text_encoder_name google/mt5-xxl \
--text_prompt examples/prompt_list_0.txt \
--ae CausalVAEModel_D4_4x8x8 \
Expand Down

0 comments on commit 294993c

Please sign in to comment.