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
| { | |
| "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" | |
| } | |
| } | |
| } | |