Instructions to use csssss/com2ai-klein-4b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use csssss/com2ai-klein-4b with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("csssss/com2ai-klein-4b", dtype=torch.bfloat16, device_map="cuda") prompt = "Turn this cat into a dog" input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png") image = pipe(image=input_image, prompt=prompt).images[0] - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
| 1 |
# FLUX\.2\-klein\-4B 整合GGUF权重包
|
| 2 |
|
| 3 |
|
|
@@ -91,5 +94,4 @@ image = pipe(
|
|
| 91 |
# 保存结果
|
| 92 |
image.save("flux-klein.png")
|
| 93 |
print("✅ 图像生成成功,已保存为 flux-klein.png")
|
| 94 |
-
```
|
| 95 |
-
|
|
|
|
| 1 |
+
---
|
| 2 |
+
pipeline_tag: image-to-image
|
| 3 |
+
---
|
| 4 |
# FLUX\.2\-klein\-4B 整合GGUF权重包
|
| 5 |
|
| 6 |
|
|
|
|
| 94 |
# 保存结果
|
| 95 |
image.save("flux-klein.png")
|
| 96 |
print("✅ 图像生成成功,已保存为 flux-klein.png")
|
| 97 |
+
```
|
|
|