Views
No views yet
1from diffusers import AutoPipelineForText2Image
2import torch
3
4pipeline = AutoPipelineForText2Image.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16).to('cuda')
5pipeline.load_lora_weights('rootonchair/2x2_sticker_sheet', weight_name='pytorch_lora_weights.safetensors', adapter_name='2x2_sticker_sheet')
6pipeline.set_adapters(['2x2_sticker_sheet'], adapter_weights=[0.8])
7
8image = pipeline('This set of four image depicts a cartoon black cat wearing a pirate hat; [IMAGE1] The cat is happy, holding a bouquet; [IMAGE2] The cat is happy, surrounded with music notes; [IMAGE3] The cat is riding a bicycle; [IMAGE4] The cat is eating an ice cream', width=512, height=512, num_inference_steps=28, guidance_scale=3.5).images[0]This set of four image depicts a cartoon <subject>; [IMAGE1]; [IMAGE2]; [IMAGE3]; [IMAGE4] to trigger the image generation.