Views
No views yet
An illustration of a serene landscape at night, moonlit mountain scene, tall pine trees on a small island, snow-capped mountains in the background, still lake reflecting trees and full moon, cloud-speckled sky dotted with stars, soft ambient lighting, primary color tones of blue and white, ambient and tranquil atmosphere, high resolution, extremely detailed.3.00.020None421344x7681import torch
2from diffusers import DiffusionPipeline
3
4model_id = 'black-forest-labs/FLUX.1-dev'
5adapter_id = 'datnt114/simpletuner-lora'
6pipeline = DiffusionPipeline.from_pretrained(model_id)
7pipeline.load_lora_weights(adapter_id)
8
9prompt = "An illustration of a serene landscape at night, moonlit mountain scene, tall pine trees on a small island, snow-capped mountains in the background, still lake reflecting trees and full moon, cloud-speckled sky dotted with stars, soft ambient lighting, primary color tones of blue and white, ambient and tranquil atmosphere, high resolution, extremely detailed."
10
11pipeline.to('cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu')
12image = pipeline(
13 prompt=prompt,
14 num_inference_steps=20,
15 generator=torch.Generator(device='cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu').manual_seed(1641421826),
16 width=1344,
17 height=768,
18 guidance_scale=3.0,
19).images[0]
20image.save("output.png", format="PNG")