kelseye commited on
Commit
d8f8753
·
verified ·
1 Parent(s): f7d202c

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ assets/training_data.jpg filter=lfs diff=lfs merge=lfs -text
.msc ADDED
Binary file (559 Bytes). View file
 
.mv ADDED
@@ -0,0 +1 @@
 
 
1
+ Revision:master,CreatedAt:1765509310
README.md ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Z-Image Turbo Acceleration Capability Fix LoRA
2
+
3
+ ## Model Introduction
4
+
5
+ This model is a LoRA used to fix the acceleration capability of Z-Image Turbo LoRA.
6
+
7
+ LoRAs trained directly based on Z-Image Turbo will lose their acceleration capability. Images generated under acceleration configuration (steps=8, cfg=1) become blurry, while images generated under non-acceleration configuration (steps=30, cfg=2) remain normal.
8
+
9
+ ## Results
10
+
11
+ Training Data:
12
+
13
+ ![](assets/training_data.jpg)
14
+
15
+ Generation Results:
16
+
17
+ |steps=8, cfg=1|steps=30, cfg=2|steps=8, cfg=1, with our model fix|
18
+ |-|-|-|
19
+ |![](assets/image_base_acc.jpg)|![](assets/image_base_nonacc.jpg)|![](assets/image_with_our_lora.jpg)|
20
+
21
+ ## Inference Code
22
+
23
+ ```python
24
+ from diffsynth.pipelines.z_image import ZImagePipeline, ModelConfig
25
+ import torch
26
+
27
+ pipe = ZImagePipeline.from_pretrained(
28
+ torch_dtype=torch.bfloat16,
29
+ device="cuda",
30
+ model_configs=[
31
+ ModelConfig(model_id="Tongyi-MAI/Z-Image-Turbo", origin_file_pattern="transformer/*.safetensors"),
32
+ ModelConfig(model_id="Tongyi-MAI/Z-Image-Turbo", origin_file_pattern="text_encoder/*.safetensors"),
33
+ ModelConfig(model_id="Tongyi-MAI/Z-Image-Turbo", origin_file_pattern="vae/diffusion_pytorch_model.safetensors"),
34
+ ],
35
+ tokenizer_config=ModelConfig(model_id="Tongyi-MAI/Z-Image-Turbo", origin_file_pattern="tokenizer/"),
36
+ )
37
+ pipe.load_lora(pipe.dit, "path/to/your/lora.safetensors")
38
+ pipe.load_lora(pipe.dit, ModelConfig(model_id="DiffSynth-Studio/Z-Image-Turbo-DistillPatch", origin_file_pattern="model.safetensors"))
39
+
40
+ image = pipe(prompt="a dog", seed=42, rand_device="cuda")
41
+ image.save("image.jpg")
42
+ ```
assets/image_base_acc.jpg ADDED
assets/image_base_nonacc.jpg ADDED
assets/image_with_our_lora.jpg ADDED
assets/training_data.jpg ADDED

Git LFS Details

  • SHA256: 1b369d4882c15dbd2f9ee9068b0daa5739aeff29ef1e487ebe6f151d8fed5ebb
  • Pointer size: 131 Bytes
  • Size of remote file: 138 kB
configuration.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"aigc_model":true,"framework":"Pytorch","model_file_location":"model.safetensors"}
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4baed399238265f65ec83b6181d6c2d4bd10f3d10f4fcf241adb6d3007e86abf
3
+ size 317579544