Views
No views yet
1import torch
2import diffusers
3
4device = "xpu" if hasattr(torch,"xpu") and torch.xpu.is_available() else "mps" if hasattr(torch,"mps") and hasattr(torch.mps, "is_available") and torch.mps.is_available() else "cuda" if torch.cuda.is_available() else "cpu"
5torch_dtype = torch.float16 if device != "cpu" else torch.float32
6
7model_path = "Disty0/RaiFlow-v0_01-256px-rough-pre-train"
8pipe = diffusers.DiffusionPipeline.from_pretrained(model_path, custom_pipeline=model_path, trust_remote_code=True, torch_dtype=torch_dtype).to(device)
9
10prompt = "1girl, character raifu, blush, upper body, blue eyes, woman, white sweater, solo, light smile, cat ears, looking at viewer, small medium breasts, long hair, dark red hair, simple background, white background"
11aes_prompt = "very aesthetic, best quality, year 2025, sfw rating, art by aviary, art by demcheg, art by woogi (duguddnr), art by honon, art by rynzfrancis"
12negative_prompt = "worst aesthetic, bad aesthetic, worst quality, bad quality, low quality, monochrome, sketch, compression artifacts"
13add_aes = True
14
15with torch.no_grad():
16 pipeline_output = pipe(
17 width=192,
18 height=320,
19 guidance_scale=7.5,
20 num_inference_steps=30,
21 pad_to_multiple_of=256,
22 max_sequence_length=512,
23 prompt=prompt if not add_aes else (aes_prompt + ", " + prompt),
24 negative_prompt=negative_prompt,
25 )
26pipeline_output.images[0].save("raiflow.png")| Effective Batch Size | 128 |
| Batch Size | 16 |
| Gradient Accumulation Steps | 4 |
| Number of GPUs | 2 |
| GPUs | Intel Arc Pro B60 24 GB |
| Learning Rate | 4e-5 |
| Optimizer | sdnq.optim.AdamW |
| Optimizer Final Norm Mode | rms_clip |
| Optimizer States Dtype | SDNQ FP16 Quantization with Group Size 32 |
| Model Weights Dtype | SDNQ FP16 Quantization with Group Size 32 |
| Activations and Gradients Dtype | FP16 with Grad Scaler |
| EMA Weights Dtype | FP32 |
| Use EMA | True |
| Self Correct Rate | 0.25 |
| Mask Rate | 0.25 |
| Image Resolution | Buckets Around 256x256 |
| Text Token Lenght | 256 or 512 depending on prompt lenght |
aesthetic tags, quality tags, year tags, style age tags, special tags, artist tags, medium tags, rating tags, no shuffle tags, character tags, copyright tags, general tags, meta tagsvery aesthetic # around 80K images
highly aesthetic # around 230K images
moderate aesthetic # around 2.7M images
low aesthetic # around 2M images
bad aesthetic # around 680K images
worst aesthetic # around 220K imagesbest quality # around 150K images
high quality # around 420K images
great quality # around 720K images
normal quality # around 1.75M images
low quality # around 1.4M images
bad quality # around 1M images
worst quality # around 550K imagesyear numberyear 20251970s (style) # around 13K images
1980s (style) # around 90K images
1990s (style) # around 100K images
2000s (style) # around 550K images
2010s (style) # around 500K images
2015s (style) # around 1.3M imagesvisual novel cg as special tag.art by name_of_the_artistart by ru zhaiphotoshop (medium), this tag is removed.sfw rating # around 2M images
sensitive rating # around 3M images
nsfw rating # around 550K images
explicit nsfw rating # around 420K imagescharacter name_of_the_charactercharacter blaze (arknights)from name_of_the_seriesfrom arknightscompression artifacts tag added.