diff --git a/examples/qwen_image/model_inference/Qwen-Image-Distill-DMD2.py b/examples/qwen_image/model_inference/Qwen-Image-Distill-DMD2.py index 007538f76..65fff0ca6 100644 --- a/examples/qwen_image/model_inference/Qwen-Image-Distill-DMD2.py +++ b/examples/qwen_image/model_inference/Qwen-Image-Distill-DMD2.py @@ -15,7 +15,7 @@ tokenizer_config=ModelConfig(model_id="Qwen/Qwen-Image", origin_file_pattern="tokenizer/"), ) -snapshot_download("MusePublic/Qwen-Image-Distill", allow_file_pattern="qwen_image_distill_3step.safetensors", cache_dir="models") +snapshot_download("MusePublic/Qwen-Image-Distill", allow_file_pattern="qwen_image_distill_3step.safetensors", local_dir="models/MusePublic/Qwen-Image-Distill") lora_state_dict = load_state_dict("models/MusePublic/Qwen-Image-Distill/qwen_image_distill_3step.safetensors") lora_state_dict = {i.replace("base_model.model.", ""): j for i, j in lora_state_dict.items()} pipe.load_lora(pipe.dit, state_dict=lora_state_dict) diff --git a/examples/qwen_image/model_inference_low_vram/Qwen-Image-Distill-DMD2.py b/examples/qwen_image/model_inference_low_vram/Qwen-Image-Distill-DMD2.py index 6b9566742..dc241c38c 100644 --- a/examples/qwen_image/model_inference_low_vram/Qwen-Image-Distill-DMD2.py +++ b/examples/qwen_image/model_inference_low_vram/Qwen-Image-Distill-DMD2.py @@ -26,7 +26,7 @@ vram_limit=torch.cuda.mem_get_info("cuda")[1] / (1024 ** 3) - 0.5, ) -snapshot_download("MusePublic/Qwen-Image-Distill", allow_file_pattern="qwen_image_distill_3step.safetensors", cache_dir="models") +snapshot_download("MusePublic/Qwen-Image-Distill", allow_file_pattern="qwen_image_distill_3step.safetensors", local_dir="models/MusePublic/Qwen-Image-Distill") lora_state_dict = load_state_dict("models/MusePublic/Qwen-Image-Distill/qwen_image_distill_3step.safetensors", device="cuda", torch_dtype=torch.bfloat16) lora_state_dict = {i.replace("base_model.model.", "").replace(".weight", ".default.weight"): j for i, j in lora_state_dict.items()} pipe.load_lora(pipe.dit, state_dict=lora_state_dict, hotload=True)