Spaces:
Runtime error
Runtime error
| import torch | |
| from diffusers import FluxPipeline | |
| # Usamos la variante en precisión FP8, que reduce la huella de memoria a la mitad | |
| pipe = FluxPipeline.from_pretrained( | |
| "black-forest-labs/FLUX.1-dev", | |
| torch_dtype=torch.float8_e4m3fn, | |
| device_map="balanced" | |
| ).to("cuda") | |
| # Cargar el LoRA | |
| pipe.load_lora_weights("joyfox/Kontext-Cosplay-Lora", weight_name="kontext_cosplay_lora_20000.safetensors") |