Views
No views yet
a high-resolution photograph featuring a young asian woman with long, straight, dark brown hair and fair skin, she has a delicate, symmetrical face with large, almond-shaped eyes, full lips, and a slight smile, her expression is calm and inviting, she is dressed in a black, off-the-shoulder dress with a deep v-neckline that accentuates her ample breasts, the dress is made of a soft, velvet-like material that clings to her curves, and it is draped over her shoulders in a gray, abstract patterned shawl, she wears a black choker with a small black ribbon and a black bracelet on her left wrist, her right hand is adorned with a gold ring, and she is holding a small, gold-colored object in her left hand, the background features a modern, minimalist setting with concrete structures and a few decorative boxes with the word chagee written on them, the overall ambiance is serene and sophisticated, with a hint of natural beauty3.00.020None421024x10241{
2 "algo": "lokr",
3 "multiplier": 1.0,
4 "linear_dim": 10000,
5 "linear_alpha": 1,
6 "factor": 16,
7 "apply_preset": {
8 "target_module": [
9 "Attention",
10 "FeedForward"
11 ],
12 "module_algo_map": {
13 "Attention": {
14 "factor": 16
15 },
16 "FeedForward": {
17 "factor": 8
18 }
19 }
20 }
21}1import torch
2from diffusers import DiffusionPipeline
3from lycoris import create_lycoris_from_weights
4
5model_id = '/data/swh/hub_model/FLUX.1-dev'
6adapter_id = 'pytorch_lora_weights.safetensors' # you will have to download this manually
7lora_scale = 1.0
8wrapper, _ = create_lycoris_from_weights(lora_scale, adapter_id, pipeline.transformer)
9wrapper.merge_to()
10
11prompt = "a high-resolution photograph featuring a young asian woman with long, straight, dark brown hair and fair skin, she has a delicate, symmetrical face with large, almond-shaped eyes, full lips, and a slight smile, her expression is calm and inviting, she is dressed in a black, off-the-shoulder dress with a deep v-neckline that accentuates her ample breasts, the dress is made of a soft, velvet-like material that clings to her curves, and it is draped over her shoulders in a gray, abstract patterned shawl, she wears a black choker with a small black ribbon and a black bracelet on her left wrist, her right hand is adorned with a gold ring, and she is holding a small, gold-colored object in her left hand, the background features a modern, minimalist setting with concrete structures and a few decorative boxes with the word chagee written on them, the overall ambiance is serene and sophisticated, with a hint of natural beauty"
12
13pipeline.to('cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu')
14image = pipeline(
15 prompt=prompt,
16 num_inference_steps=20,
17 generator=torch.Generator(device='cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu').manual_seed(1641421826),
18 width=1024,
19 height=1024,
20 guidance_scale=3.0,
21).images[0]
22image.save("output.png", format="PNG")