OzzyGT HF Staff commited on
Commit
0a411f1
·
verified ·
1 Parent(s): 3be3841

Upload 3 files

Browse files
.gitattributes CHANGED
@@ -35,3 +35,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
  LICENSE.pdf filter=lfs diff=lfs merge=lfs -text
37
  tokenizer/tokenizer.json filter=lfs diff=lfs merge=lfs -text
 
 
 
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
  LICENSE.pdf filter=lfs diff=lfs merge=lfs -text
37
  tokenizer/tokenizer.json filter=lfs diff=lfs merge=lfs -text
38
+ comparison_bf16_vs_sdnq.png filter=lfs diff=lfs merge=lfs -text
39
+ sample_benchmark.png filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -18,8 +18,44 @@ library_name: diffusers
18
 
19
  This is an int4 quantized version of [krea/Krea-2-Turbo](https://huggingface.co/krea/Krea-2-Turbo) using [SDNQ](https://github.com/Disty0/sdnq) (SD.Next Quantization) with the dynamic option and Hadamard Rotation.
20
 
21
- Note: You need SDNQ v0.2.0 or superior
22
 
23
  ## Usage
24
 
25
- You can find ready-to-use scripts in the [diffusers-recipes](https://github.com/asomoza/diffusers-recipes/blob/main/models/krea2_turbo/README.md) repository.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
 
19
  This is an int4 quantized version of [krea/Krea-2-Turbo](https://huggingface.co/krea/Krea-2-Turbo) using [SDNQ](https://github.com/Disty0/sdnq) (SD.Next Quantization) with the dynamic option and Hadamard Rotation.
20
 
21
+ Note: You need SDNQ v0.2.0 or v0.2.2 and above (v0.2.1 is incompatible)
22
 
23
  ## Usage
24
 
25
+ You can find ready-to-use scripts in the [diffusers-recipes](https://github.com/asomoza/diffusers-recipes/blob/main/models/krea2_turbo/README.md) repository.
26
+
27
+ ## Sample image
28
+
29
+ ![Sample generation](sample_benchmark.png)
30
+
31
+ The sample above was generated with the following prompt and settings (seed `7`):
32
+
33
+ ```python
34
+ import sdnq # register the SDNQ backend before loading
35
+ import torch
36
+ from diffusers import DiffusionPipeline
37
+
38
+ pipe = DiffusionPipeline.from_pretrained("OzzyGT/Krea_2_Turbo_sdnq_dynamic_4bit", torch_dtype=torch.bfloat16)
39
+ pipe.to("cuda")
40
+
41
+ prompt = (
42
+ "A cozy corner bookstore-cafe on a rainy evening, cinematic wide shot. "
43
+ 'A large hand-lettered chalkboard sign in the window reads "FRESH COFFEE & OLD BOOKS" '
44
+ "and below it in smaller chalk letters \"open 'til late\". "
45
+ "Warm golden light spills onto wet cobblestones that mirror pink and blue neon reflections. "
46
+ "Inside, tall mahogany shelves are packed with hundreds of colorful book spines with tiny legible titles, "
47
+ "a barista in a striped apron pours delicate latte art, steam curling upward, "
48
+ "a tabby cat sleeps on a windowsill beside a stack of paperbacks. "
49
+ "Intricate detail, sharp focus, shallow depth of field, photorealistic, rich color grading."
50
+ )
51
+
52
+ image = pipe(
53
+ prompt,
54
+ num_inference_steps=8,
55
+ guidance_scale=0.0,
56
+ height=1024,
57
+ width=1024,
58
+ generator=torch.Generator("cuda").manual_seed(7),
59
+ ).images[0]
60
+ image.save("sample.png")
61
+ ```
comparison_bf16_vs_sdnq.png ADDED

Git LFS Details

  • SHA256: 017617a2db2e46e81fdb7ee10524de51fedc30d76c5f0eb0d460178b6906ec1c
  • Pointer size: 132 Bytes
  • Size of remote file: 2.75 MB
sample_benchmark.png ADDED

Git LFS Details

  • SHA256: 9bc0eccd094ec1b56a41ed3c577dabfd900e8e19ee1f1e10ad6c001ad7ac0091
  • Pointer size: 132 Bytes
  • Size of remote file: 1.36 MB