12GB of VRAM won't work? Can it be used with FLUX.1-schnell?

#7
by andchir - opened

12GB of VRAM won't work? How much video memory does this require?

Can it be used with FLUX.1-schnell?

It works with 12 but the main flux model has to be quantized.

@Karachay Thanks for the reply. So I can use quantized Flux?
For example, I can use this model:
https://huggingface.co/lllyasviel/flux1-dev-bnb-nf4
Or does the upscaler model also need to be quantized? There is no such model now?

Can you please explain how quantizing a model works? I have 16 GBs of RAM and I am not able to load the model with the following code:

import torch
from diffusers import FluxControlNetModel
from diffusers.pipelines import FluxControlNetPipeline

# Load pipeline
controlnet = FluxControlNetModel.from_pretrained(
  "jasperai/Flux.1-dev-Controlnet-Upscaler",
  torch_dtype=torch.bfloat16
)
pipe = FluxControlNetPipeline.from_pretrained(
  "black-forest-labs/FLUX.1-dev",
  controlnet=controlnet,
  torch_dtype=torch.bfloat16
)
pipe.to("cuda")

I get this error:
OutOfMemoryError: CUDA out of memory.

@Karachay

Sign up or log in to comment