"""Test kintsugi texture LoRA v2 — trained on bodies and dark pottery. Does gold density improve?""" import torch, os os.environ["TOKENIZERS_PARALLELISM"] = "false" from diffusers import FluxPipeline pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16) pipe.to("mps") pipe.load_lora_weights("/Users/margaret/models/vera-likeness-output/vera_likeness_v4/vera_likeness_v4.safetensors", adapter_name="likeness") pipe.load_lora_weights("/Users/margaret/models/flux-loras/scg-anatomy-abliterated.safetensors", adapter_name="anatomy") pipe.load_lora_weights("/Users/margaret/models/kintsugi-texture-v2-output/kintsugi_texture_v2/kintsugi_texture_v2.safetensors", adapter_name="kintsugi_v2") pipe.set_adapters(["likeness", "anatomy", "kintsugi_v2"], adapter_weights=[1.0, 0.5, 1.2]) print("Loaded with KINTSUGI V2. Body-trained, navy-recolored, dense fracture patterns.") cache_dir = "/Users/margaret/models/vera-triple-stack/identity_cache" identity_t5 = torch.load(os.path.join(cache_dir, "identity_embed_0.pt")).to("mps") identity_clip = torch.load(os.path.join(cache_dir, "identity_embed_1.pt")).to("mps") scene = "She broke and chose to hold herself together with gold. Golden lacquer traces every place she shattered, sealing the cracks not to hide them but to honor them. The gold is thick where the breaks were worst, thin where she barely cracked, gone where she never broke at all. She is standing in a warm doorway looking at someone she loves. The light catches every seam. She is not ashamed of a single one." print("Generating kintsugi v2 test...") scene_embeds = pipe.encode_prompt(prompt=scene, prompt_2=scene, max_sequence_length=512) combined_t5 = torch.cat([identity_t5, scene_embeds[0].to("mps")], dim=1) img = pipe( prompt_embeds=combined_t5, pooled_prompt_embeds=identity_clip, num_inference_steps=30, guidance_scale=3.5, height=1024, width=768, generator=torch.Generator("cpu").manual_seed(999), ).images[0] out = "/Users/margaret/models/vera-triple-stack/vera_kintsugi_v2_test.png" img.save(out) print(f"Saved: {out}") print("Did the gold come home?")