Views
No views yet
fa187b11job: "extension"
2config:
3 name: "FAS"
4 process:
5 - type: "ui_trainer"
6 training_folder: "/data/minpeter/github.com/flux/ai-toolkit/output"
7 sqlite_db_path: "./aitk_db.db"
8 device: "cuda"
9 trigger_word: "anime style"
10 performance_log_every: 10
11 network:
12 type: "lora"
13 linear: 32
14 linear_alpha: 32
15 lokr_full_rank: true
16 lokr_factor: -1
17 save:
18 dtype: "bf16"
19 save_every: 250
20 max_step_saves_to_keep: 4
21 save_format: "diffusers"
22 push_to_hub: false
23 datasets:
24 - folder_path: "/data/minpeter/github.com/flux/ai-toolkit/datasets/fas"
25 mask_path: null
26 mask_min_value: 0.1
27 default_caption: "anime style, "
28 caption_ext: "txt"
29 caption_dropout_rate: 0.05
30 cache_latents_to_disk: false
31 is_reg: false
32 network_weight: 1
33 resolution:
34 - 512
35 - 768
36 - 1024
37 - 1280
38 - 1536
39 - 256
40 - folder_path: "/data/minpeter/github.com/flux/ai-toolkit/datasets/f"
41 mask_path: null
42 mask_min_value: 0.1
43 default_caption: ""
44 caption_ext: "txt"
45 caption_dropout_rate: 0.05
46 cache_latents_to_disk: false
47 is_reg: false
48 network_weight: 1
49 resolution:
50 - 512
51 - 768
52 - 1024
53 - 1280
54 - 1536
55 - 256
56 train:
57 batch_size: 1
58 bypass_guidance_embedding: false
59 steps: 2500
60 gradient_accumulation: 1
61 train_unet: true
62 train_text_encoder: false
63 gradient_checkpointing: true
64 noise_scheduler: "flowmatch"
65 optimizer: "adamw8bit"
66 timestep_type: "sigmoid"
67 content_or_style: "balanced"
68 optimizer_params:
69 weight_decay: 0.0001
70 unload_text_encoder: false
71 lr: 0.0001
72 ema_config:
73 use_ema: true
74 ema_decay: 0.99
75 dtype: "bf16"
76 diff_output_preservation: false
77 diff_output_preservation_multiplier: 1
78 diff_output_preservation_class: "person"
79 model:
80 name_or_path: "black-forest-labs/FLUX.1-dev"
81 quantize: true
82 quantize_te: true
83 arch: "flux"
84 low_vram: false
85 sample:
86 sampler: "flowmatch"
87 sample_every: 250
88 width: 1024
89 height: 1024
90 prompts:
91 - "anime style, woman with red hair, playing chess at the park, bomb going off in the background"
92 - "anime style, a man showing off his cool new t shirt at the beach, a shark is jumping out of the water in the background"
93 - "anime style, a bear building a log cabin in the snow covered mountains"
94 neg: ""
95 seed: 42
96 walk_seed: true
97 guidance_scale: 4
98 sample_steps: 25
99 num_frames: 1
100 fps: 1
101meta:
102 name: "[name]"
103 version: "1.0"anime style to trigger the image generation.1import torch
2from diffusers import FluxPipeline
3
4pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16).to("cuda")
5
6from huggingface_hub import hf_hub_download
7
8pipe.load_lora_weights(
9 hf_hub_download("minpeter/FAS-v1", "adapter.safetensors"), adapter_name="fas-v1"
10)
11
12pipe.set_adapters(["fas-v1"], adapter_weights=[1])
13
14prompt = "anime style, A vibrant fantasy city with sky-high spires and unique architectural buildings stacked upon each other, featuring bright and colorful tones with intricate details – anime style background."
15
16image = pipe(
17 prompt=prompt,
18 guidance_scale=3.5,
19 height=1024,
20 width=1024,
21 num_inference_steps=20,
22).images[0]
23
24image.save("s4.png")