nifleisch commited on
Commit
60e8e0a
·
verified ·
1 Parent(s): 3e36151

Correct BF16 timestep embedding in Diffusers example

Browse files
Files changed (1) hide show
  1. README.md +4 -1
README.md CHANGED
@@ -19,7 +19,7 @@ tags:
19
 
20
  # Qwen-Image-2.1-P-Turbo
21
 
22
- **Improved using Qwen.** A five-step LoRA adapter for [Qwen Image 2.1](https://huggingface.co/Qwen/Qwen-Image-2.1). The adapter weights are a modification of the base model; its license applies. The `_comfyui_bf16.safetensors` file is for ComfyUI. Use LoRA strength 1.0, float32 Euler updates, and sigma schedule `1 → 13/14 → 6/7 → 2/3 → 0.4 → 0`.
23
 
24
  ## Quick Start
25
 
@@ -51,6 +51,9 @@ pipe.load_lora_weights(
51
  "PrunaAI/Qwen-Image-2.1-P-Turbo",
52
  weight_name="p_qwen_image_2.1_5step_v1.0.safetensors",
53
  )
 
 
 
54
  pipe.scheduler = Float32EulerScheduler.from_config(
55
  pipe.scheduler.config,
56
  use_dynamic_shifting=False,
 
19
 
20
  # Qwen-Image-2.1-P-Turbo
21
 
22
+ **Improved using Qwen.** A five-step LoRA adapter for [Qwen Image 2.1](https://huggingface.co/Qwen/Qwen-Image-2.1). The adapter weights are a modification of the base model; its license applies. The `_comfyui_bf16.safetensors` file is for ComfyUI. Use LoRA strength 1.0, BF16 timestep frequencies, float32 Euler updates, and sigma schedule `1 → 13/14 → 6/7 → 2/3 → 0.4 → 0`.
23
 
24
  ## Quick Start
25
 
 
51
  "PrunaAI/Qwen-Image-2.1-P-Turbo",
52
  weight_name="p_qwen_image_2.1_5step_v1.0.safetensors",
53
  )
54
+ # Match the BF16 timestep embedding used by this adapter.
55
+ time_proj = pipe.transformer.time_text_embed.time_proj
56
+ time_proj.freqs = time_proj.freqs.to(torch.bfloat16)
57
  pipe.scheduler = Float32EulerScheduler.from_config(
58
  pipe.scheduler.config,
59
  use_dynamic_shifting=False,