mirror of
https://www.modelscope.cn/black-forest-labs/FLUX.2-klein-base-4B.git
synced 2026-04-03 02:42:54 +08:00
Update README.md (batch 1/1)
This commit is contained in:
10
README.md
10
README.md
@ -40,11 +40,11 @@ FLUX.2 [klein] 4B Base is also available in both [ComfyUI](https://github.com/co
|
|||||||
|
|
||||||
To use FLUX.2 [klein] 4B Base with the 🧨 Diffusers python library, first install or upgrade diffusers:
|
To use FLUX.2 [klein] 4B Base with the 🧨 Diffusers python library, first install or upgrade diffusers:
|
||||||
|
|
||||||
```python
|
```shell
|
||||||
pip install -U diffusers
|
pip install git+https://github.com/huggingface/diffusers.git
|
||||||
|
```
|
||||||
Then you can use Flux2KleinPipeline to run the model:
|
Then you can use Flux2KleinPipeline to run the model:
|
||||||
|
```python
|
||||||
import torch
|
import torch
|
||||||
from diffusers import Flux2KleinPipeline
|
from diffusers import Flux2KleinPipeline
|
||||||
|
|
||||||
@ -56,7 +56,7 @@ pipe.enable_model_cpu_offload() # save some VRAM by offloading the model to CPU
|
|||||||
|
|
||||||
prompt = "A cat holding a sign that says hello world"
|
prompt = "A cat holding a sign that says hello world"
|
||||||
image = pipe(
|
image = pipe(
|
||||||
prompt,
|
prompt=prompt,
|
||||||
height=1024,
|
height=1024,
|
||||||
width=1024,
|
width=1024,
|
||||||
guidance_scale=4.0,
|
guidance_scale=4.0,
|
||||||
|
|||||||
Reference in New Issue
Block a user