Views
No views yet
species_id ของ Pl@ntNet ข้างในมี pytorch_lora_weights.safetensors ไฟล์เดียว ส่วน lora_registry.csv บอกว่า species_id ไหนคือพืชอะไร พร้อม trigger word และ prompt template| species_id | species |
|---|---|
| 1416509 | Nepenthes vieillardii |
| 1419807 | Vanilla planifolia |
| 1376703 | Petiveria alliacea |
| 1409195 | Pereskia aculeata |
| 1408557 | Pongamia pinnata |
| 1420787 | Alocasia odora |
| 1406486 | Kigelia africana |
| 1408490 | Pereskia grandifolia |
| 1385700 | Barringtonia asiatica |
| 1356076 | Tradescantia zebrina |
| 1397598 | Cobaea scandens |
| 1618661 | Dendrobium victoriae-reginae |
| 1384499 | Lagenaria siceraria |
| 1406863 | Acalypha indica |
| 1392654 | Gomphocarpus physocarpus |
1from diffusers import Flux2KleinPipeline
2import torch
3
4pipe = Flux2KleinPipeline.from_pretrained(
5 "black-forest-labs/FLUX.2-klein-base-4B", torch_dtype=torch.bfloat16
6).to("cuda")
7
8# โหลด LoRA ของ species ที่ต้องการ (เช่น Vanilla planifolia = 1419807)
9sid = "1419807"
10pipe.load_lora_weights("Winnnnnnn/lora-boost-flux", subfolder=sid)
11
12# prompt ต้องใช้ trigger sks_<species_id> ตาม template ตอนเทรน organ เลือก flower หรือ leaf
13prompt = f"a photo of the flower of a sks_{sid} plant"
14image = pipe(prompt, num_inference_steps=28, guidance_scale=4.0).images[0]sks_<species_id> และ template คือ a photo of the {organ} of a {trigger} plant ดูครบทุก species ได้ใน lora_registry.csv