Views
No views yet
The image is a black and white illustration of a man with a long beard and a long white beard, sitting on the ground with his arms raised above his head. He appears to be in a meditative pose, with his eyes closed and a peaceful expression on his face. Behind him, there are two other men, one lying on their backs and the other lying down. The background shows a mountain landscape with a cloudy sky. The text above the illustration reads 'Let the day perish where I was born. And they sat down with him upon the ground seven days & seven nights and none spoke a word unto him for they saw that his grief was very great.' The illustration is framed by a decorative border.7.50.020None4210241import torch
2from diffusers import DiffusionPipeline
3
4model_id = 'black-forest-labs/FLUX.1-dev'
5adapter_id = 'davidrd123/lora-Kirchner-flux'
6pipeline = DiffusionPipeline.from_pretrained(model_id)
7pipeline.load_lora_weights(adapter_id)
8
9prompt = "The image is a black and white illustration of a man with a long beard and a long white beard, sitting on the ground with his arms raised above his head. He appears to be in a meditative pose, with his eyes closed and a peaceful expression on his face. Behind him, there are two other men, one lying on their backs and the other lying down. The background shows a mountain landscape with a cloudy sky. The text above the illustration reads 'Let the day perish where I was born. And they sat down with him upon the ground seven days & seven nights and none spoke a word unto him for they saw that his grief was very great.' The illustration is framed by a decorative border."
10
11
12pipeline.to('cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu')
13image = pipeline(
14 prompt=prompt,
15 num_inference_steps=20,
16 generator=torch.Generator(device='cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu').manual_seed(1641421826),
17 width=1024,
18 height=1024,
19 guidance_scale=7.5,
20).images[0]
21image.save("output.png", format="PNG")