Disty0 commited on
Commit
1e1d8c0
·
verified ·
1 Parent(s): c48a5a0

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +45 -3
README.md CHANGED
@@ -1,3 +1,45 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model:
4
+ - Qwen/Qwen-Image-Edit-2509
5
+ library_name: diffusers
6
+ tags:
7
+ - sdnq
8
+ - qwen_image
9
+ ---
10
+ 4 bit (UINT4 with SVD rank 32) quantization of [Qwen/Qwen-Image-Edit-2509](https://huggingface.co/Qwen/Qwen-Image-Edit-2509) using [SDNQ](https://github.com/vladmandic/sdnext/wiki/SDNQ-Quantization).
11
+
12
+ Usage:
13
+ ```
14
+ pip install git+https://github.com/Disty0/sdnq
15
+ ```
16
+
17
+ ```py
18
+ import torch
19
+ import diffusers
20
+ from sdnq import SDNQConfig # import sdnq to register it into diffusers and transformers
21
+
22
+ pipe = diffusers.QwenImageEditPlusPipeline.from_pretrained("Disty0/Qwen-Image-Edit-2509-SDNQ-uint4-svd-r32", torch_dtype=torch.bfloat16)
23
+ pipe.enable_model_cpu_offload()
24
+ pipe.set_progress_bar_config(disable=None)
25
+
26
+ image1 = Image.open("input1.png")
27
+ image2 = Image.open("input2.png")
28
+ prompt = "The magician bear is on the left, the alchemist bear is on the right, facing each other in the central park square."
29
+ inputs = {
30
+ "image": [image1, image2],
31
+ "prompt": prompt,
32
+ "generator": torch.manual_seed(0),
33
+ "true_cfg_scale": 4.0,
34
+ "negative_prompt": " ",
35
+ "num_inference_steps": 40,
36
+ "guidance_scale": 1.0,
37
+ "num_images_per_prompt": 1,
38
+ }
39
+ with torch.inference_mode():
40
+ output = pipeline(**inputs)
41
+ output_image = output.images[0]
42
+ output_image.save("output_image_edit_plus.png")
43
+
44
+ image.save("qwen-image-edit-2509-sdnq-uint4-svd-r32.png")
45
+ ```