Norod78/Yarn-art-style
Viewer • Updated • 18 • 650 • 12
How to use markod0925/yarn_flux with Diffusers:
pip install -U diffusers transformers accelerate
import torch
from diffusers import DiffusionPipeline
# switch to "mps" for apple devices
pipe = DiffusionPipeline.from_pretrained("markod0925/yarn_flux", dtype=torch.bfloat16, device_map="cuda")
prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k"
image = pipe(prompt).images[0]Make everything as Yarn Art Syle.
Make everything as Yarn Art Syle.
!pip install -U diffusers bitsandbytes
from diffusers import AutoPipelineForText2Image, BitsAndBytesConfig
import torch
repo_id = "markod0925/yarn_flux"
bnb_4bit_compute_dtype = torch.float16
nf4_config = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_quant_type="nf4",
bnb_4bit_compute_dtype=bnb_4bit_compute_dtype,
)
pipeline = AutoPipelineForText2Image.from_pretrained(repo_id,
torch_dtype=bnb_4bit_compute_dtype
)
pipeline.enable_model_cpu_offload()
image = pipeline(
"Astronaut in a jungle, cold color palette, muted colors, detailed, 8k", num_inference_steps=28, guidance_scale=3.5, height=768
).images[0]
image
image = pipeline(
"Astronaut in a jungle, cold color palette, muted colors, detailed, 8k, yarn art style", num_inference_steps=28, guidance_scale=3.5, height=768
).images[0]
image
Base model
black-forest-labs/FLUX.1-dev