Instructions to use DFloat11/FLUX.1-Kontext-dev-DF11 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use DFloat11/FLUX.1-Kontext-dev-DF11 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("DFloat11/FLUX.1-Kontext-dev-DF11", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps
- Draw Things
- DiffusionBee
The CUDA version is 12.0, and running dfloat11 will result in an error.
_decode = cp.RawModule(path=ptx_path).get_function('decode')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "cupy/_core/raw.pyx", line 487, in cupy._core.raw.RawModule.get_function
File "cupy/_core/raw.pyx", line 100, in cupy._core.raw.RawKernel.kernel.get
File "cupy/_core/raw.pyx", line 117, in cupy._core.raw.RawKernel._kernel
File "cupy/_util.pyx", line 64, in cupy._util.memoize.decorator.ret
File "cupy/_core/raw.pyx", line 546, in cupy._core.raw._get_raw_module
File "cupy/cuda/function.pyx", line 261, in cupy.cuda.function.Module.load_file
File "cupy_backends/cuda/api/driver.pyx", line 216, in cupy_backends.cuda.api.driver.moduleLoad
File "cupy_backends/cuda/api/driver.pyx", line 63, in cupy_backends.cuda.api.driver.check_status
cupy_backends.cuda.api.driver.CUDADriverError: CUDA_ERROR_UNSUPPORTED_PTX_VERSION: the provided PTX was compiled with an unsupported toolchain.
May I ask what is going on here, and is there any way to resolve it?
Updating your CUDA to the latest version will fix this.
Due to various reasons, the CUDA version cannot be updated and is currently at 12.0. Is there a way to resolve this situation?