Untitled
unknown
python
2 years ago
824 B
4
Indexable
import random from torch import autocast a = random.randint(0,1000000) print(a) generator = torch.Generator("cuda").manual_seed(a) # prompt = "a professional studio photograph of a beautiful woman from england, realistic portrait, sharp focus, high definition, insanely detailed, elegant, golden ratio, head and shoulders, dramatic cinematic lighting, sigma art 85mm f1.8" # prompt = "a black and white erotic photograph of a beautiful slim busty girl in lingerie, realistic portrait, sharp focus, high definition, symmetrical, insanely detailed, sigma art 50mm f1.8" prompt = "a photograph of a beautiful woman from Sweden, realistic portrait by Richard Avedon" with autocast("cuda"): image = pipe(prompt, num_inference_steps=20, generator=generator)["sample"][0] image.save(f"generated.png") image