Views
No views yet
diffusers1pip install dfloat11[cuda12]
2# or if you have CUDA version 11:
3# pip install dfloat11[cuda11]1import torch
2from diffusers import FluxPipeline
3from dfloat11 import DFloat11Model
4pipe = FluxPipeline.from_pretrained("mikeyandfriends/PixelWave_FLUX.1-schnell_04", torch_dtype=torch.bfloat16)
5pipe.enable_model_cpu_offload()
6DFloat11Model.from_pretrained('mingyi456/PixelWave_FLUX.1-schnell_04-DF11', device='cpu', bfloat16_model=pipe.transformer)
7prompt = "A futuristic cityscape at sunset, with flying cars, neon lights, and reflective water canals"
8image = pipe(
9 prompt,
10 guidance_scale=3.5,
11 num_inference_steps=8,
12 max_sequence_length=256,
13 generator=torch.Generator("cpu").manual_seed(0)
14).images[0]
15image.save("PixelWave_FLUX.1-dev_03.png")