JacobLinCool commited on
Commit
f9619bf
·
verified ·
1 Parent(s): e3b8ed3

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +21 -0
README.md CHANGED
@@ -73,3 +73,24 @@ You should use `Jacob` to trigger the image generation.
73
 
74
 
75
  [Download](/JacobLinCool/Z-Image-Trubo-jacob-v0.1/tree/main) them in the Files & versions tab.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
73
 
74
 
75
  [Download](/JacobLinCool/Z-Image-Trubo-jacob-v0.1/tree/main) them in the Files & versions tab.
76
+
77
+ ```py
78
+ import torch
79
+ from diffusers import DiffusionPipeline
80
+
81
+ pipe = DiffusionPipeline.from_pretrained(
82
+ "Tongyi-MAI/Z-Image-Turbo", torch_dtype=torch.bfloat16
83
+ ).to("cuda")
84
+ pipe.load_lora_weights("JacobLinCool/Z-Image-Trubo-jacob-251202")
85
+
86
+ prompt = "Jacob is talking, high quality professional portrait"
87
+ image = pipe(
88
+ prompt,
89
+ height=2048,
90
+ width=1536,
91
+ num_inference_steps=9,
92
+ guidance_scale=0.0,
93
+ ).images[0]
94
+
95
+ image.save("output.png")
96
+ ```