# Pepeline error in Colab

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fpepeline-error-in-colab%2F148148%3E%5C
**Category:** 🧨 Diffusers\
**Created:** [March 31, 2025, 5:47am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fpepeline-error-in-colab%2F148148 "2025-03-31T05:47:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amit71965](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/amit71965/32/44452_2.png) [@Amit71965](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FAmit71965)%5C
**Post date:** [March 31, 2025, 5:47am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fpepeline-error-in-colab%2F148148%2F1 "2025-03-31T05:47:44Z")

</div>

For below code:

# Step 5: Load the base model and LoRA weights

from diffusers import DiffusionPipeline

import torch

print(“Loading base FLUX.1-dev model…”)

# Load the base model

pipe = DiffusionPipeline.from\_pretrained( #This is the line where I’m getting an error

“black-forest-labs/FLUX.1-dev”,

torch\_dtype=torch.float16,

use\_safetensors=True,

variant=“fp16”

)

# Move the model to GPU for faster processing

pipe = pipe.to(“cuda”)

# Load the LoRA weights

print(“Loading and applying LoRA weights from Amit71965/ai-amit…”)

pipe.load\_lora\_weights(“Amit71965/ai-amit”)

# Optional: Test the model with a sample prompt

test\_prompt = “Amit in a suit, professional portrait, high quality, detailed”

print(f"Generating a test image with prompt: ‘{test\_prompt}’")

test\_image = pipe(test\_prompt).images[0]

test\_image.save(os.path.join(base\_dir, “test\_image.png”))

print(f"Test image saved to {os.path.join(base\_dir, ‘test\_image.png’)}")

For Step 5 cell code, After running the cell I’m getting an error. Which is also attached as a screenshot.

 ![Screenshot 2025-03-31 at 1.43.09 AM](https://us1.discourse-cdn.com/hellohellohello/original/3X/e/c/ec892d235de1f026522e134a96ed0381fbb5b13a.jpeg)

How do I resolve this issue. I’m trying to lead this models and then perform quantisation and then convert it to CoreML to embed in iOS Application.

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FJohn6666)%5C
**Post date:** [March 31, 2025, 7:42am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fpepeline-error-in-colab%2F148148%2F2 "2025-03-31T07:42:31Z")

</div>

Try this.

```py
# Load the base model
pipe = DiffusionPipeline.from_pretrained( #This is the line where I’m getting an error
   "black-forest-labs/FLUX.1-dev",
    torch_dtype=torch.float16,
    use_safetensors=True,
    #variant=“fp16” # <= Not required in this case. Use this when you want to load a file that is named .fp16.safetensors
)

```
