Instructions to use Baragi-AI/LPC-FourDirection-Walk-Flux-Klein-9B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Baragi-AI/LPC-FourDirection-Walk-Flux-Klein-9B with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.2-klein-base-9B", torch_dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("Baragi-AI/LPC-FourDirection-Walk-Flux-Klein-9B") prompt = "Turn this cat into a dog" input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png") image = pipe(image=input_image, prompt=prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
File size: 3,055 Bytes
4c3e3fc | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | {
"1": {
"class_type": "LoadImage",
"inputs": {
"image": "input.png"
}
},
"2": {
"class_type": "ImageScaleToTotalPixels",
"inputs": {
"image": ["1", 0],
"upscale_method": "lanczos",
"megapixels": 1.0,
"resolution_steps": 1
}
},
"3": {
"class_type": "UNETLoader",
"inputs": {
"unet_name": "flux-2-klein-base-9b-fp8.safetensors",
"weight_dtype": "default"
}
},
"4": {
"class_type": "LoraLoaderModelOnly",
"inputs": {
"model": ["3", 0],
"lora_name": "Baragi-AI__LPC-FourDirection-Walk-Flux-Klein-9B__LPC_FourDirection_Walk_ComfyUI.safetensors",
"strength_model": 1.0
}
},
"5": {
"class_type": "CLIPLoader",
"inputs": {
"clip_name": "qwen_3_8b_fp8mixed.safetensors",
"type": "flux2",
"device": "default"
}
},
"6": {
"class_type": "VAELoader",
"inputs": {
"vae_name": "full_encoder_small_decoder.safetensors"
}
},
"7": {
"class_type": "GetImageSize",
"inputs": {
"image": ["2", 0]
}
},
"8": {
"class_type": "EmptyFlux2LatentImage",
"inputs": {
"width": ["7", 0],
"height": ["7", 1],
"batch_size": 1
}
},
"9": {
"class_type": "CLIPTextEncode",
"inputs": {
"text": "TASK_ROTATE_STANDING: Turn the south-facing standing female LPC character to face north. Preserve the exact hairstyle, hair color, clothing, shoes and accessories. Keep the character centered on a pure white background.",
"clip": ["5", 0]
}
},
"10": {
"class_type": "CLIPTextEncode",
"inputs": {
"text": "",
"clip": ["5", 0]
}
},
"11": {
"class_type": "VAEEncode",
"inputs": {
"pixels": ["2", 0],
"vae": ["6", 0]
}
},
"12": {
"class_type": "ReferenceLatent",
"inputs": {
"conditioning": ["9", 0],
"latent": ["11", 0]
}
},
"13": {
"class_type": "ReferenceLatent",
"inputs": {
"conditioning": ["10", 0],
"latent": ["11", 0]
}
},
"14": {
"class_type": "RandomNoise",
"inputs": {
"noise_seed": 710001
}
},
"15": {
"class_type": "Flux2Scheduler",
"inputs": {
"steps": 28,
"width": ["7", 0],
"height": ["7", 1]
}
},
"16": {
"class_type": "KSamplerSelect",
"inputs": {
"sampler_name": "euler"
}
},
"17": {
"class_type": "CFGGuider",
"inputs": {
"model": ["4", 0],
"positive": ["12", 0],
"negative": ["13", 0],
"cfg": 5.0
}
},
"18": {
"class_type": "SamplerCustomAdvanced",
"inputs": {
"noise": ["14", 0],
"guider": ["17", 0],
"sampler": ["16", 0],
"sigmas": ["15", 0],
"latent_image": ["8", 0]
}
},
"19": {
"class_type": "VAEDecode",
"inputs": {
"samples": ["18", 0],
"vae": ["6", 0]
}
},
"20": {
"class_type": "SaveImage",
"inputs": {
"images": ["19", 0],
"filename_prefix": "LPC_FourDirection_Walk"
}
}
}
|