Views
No views yet
FluxPipeline to run the model1import torch
2from diffusers import FluxPipeline
3pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16).to('cuda')
4pipe.load_lora_weights("Jialuo21/Science-T2I-Flux-SFT")
5
6prompt = "An unripe grape in the garden"
7image = pipe(
8 prompt,
9 height=1024,
10 width=1024,
11 guidance_scale=0.0,
12 num_inference_steps=50,
13 max_sequence_length=512,
14 generator=torch.Generator("cpu").manual_seed(0)
15).images[0]
16image.save("example.png")@misc{li2025sciencet2iaddressingscientificillusions,
title={Science-T2I: Addressing Scientific Illusions in Image Synthesis},
author={Jialuo Li and Wenhao Chai and Xingyu Fu and Haiyang Xu and Saining Xie},
year={2025},
eprint={2504.13129},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2504.13129},
}