ww
This commit is contained in:
BIN
ai/__pycache__/__init__.cpython-310.pyc
Normal file
BIN
ai/__pycache__/__init__.cpython-310.pyc
Normal file
Binary file not shown.
BIN
ai/__pycache__/checkHandStatic.cpython-310.pyc
Normal file
BIN
ai/__pycache__/checkHandStatic.cpython-310.pyc
Normal file
Binary file not shown.
@@ -0,0 +1,18 @@
|
||||
import torch
|
||||
from diffusers import FluxPipeline
|
||||
|
||||
access_token = "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"
|
||||
pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16, token=access_token)
|
||||
pipe.enable_model_cpu_offload() #save some VRAM by offloading the model to CPU. Remove this if you have enough GPU power
|
||||
|
||||
prompt = "A cat holding a sign that says hello world"
|
||||
image = pipe(
|
||||
prompt,
|
||||
height=1024,
|
||||
width=1024,
|
||||
guidance_scale=3.5,
|
||||
num_inference_steps=50,
|
||||
max_sequence_length=512,
|
||||
generator=torch.Generator("cpu").manual_seed(0)
|
||||
).images[0]
|
||||
image.save("flux-dev.png")
|
||||
Reference in New Issue
Block a user