chatglm quantize

This commit is contained in:
Artiprocher
2024-08-02 14:46:29 +08:00
parent 6877b460c4
commit ec877bf490
2 changed files with 195 additions and 2 deletions

File diff suppressed because one or more lines are too long

View File

@@ -12,6 +12,10 @@ model_manager = ModelManager(torch_dtype=torch.float16, device="cuda",
])
pipe = SDXLImagePipeline.from_model_manager(model_manager)
# Optional (Int4 quantize) pip install cpm_kernels
# pipe.text_encoder_kolors = pipe.text_encoder_kolors.quantize(4)
# torch.cuda.empty_cache()
prompt = "一幅充满诗意美感的全身画,泛红的肤色,画中一位银色长发、蓝色眼睛、肤色红润、身穿蓝色吊带连衣裙的少女漂浮在水下,面向镜头,周围是光彩的气泡,和煦的阳光透过水面折射进水下"
negative_prompt = "半身,苍白的肤色,蜡黄的肤色,尸体,错误的眼睛,糟糕的人脸,毁容,糟糕的艺术,变形,多余的肢体,模糊的颜色,模糊,重复,病态,残缺,错误的手指,口红,腮红"