This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import torch | |
| from diffusers.models import QwenImageTransformer2DModel | |
| from diffusers import QwenImageEditPlusPipeline | |
| from diffusers.utils import load_image | |
| dtype = torch.bfloat16 | |
| device = "cuda" if torch.cuda.is_available() else "cpu" | |
| # load pipeline with Rapid AIO transfromer | |
| pipe = QwenImageEditPlusPipeline.from_pretrained("Qwen/Qwen-Image-Edit-2509", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| !pip install git+https://github.com/huggingface/diffusers.git@refs/pull/12004/head | |
| import torch | |
| import numpy as np | |
| from diffusers import WanImageToVideoPipeline | |
| from diffusers.utils import export_to_video, load_image | |
| model_id = "Wan-AI/Wan2.2-I2V-A14B-Diffusers" | |
| dtype = torch.bfloat16 | |
| device = "cuda" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # download FluxCFGPipline | |
| !wget https://raw.githubusercontent.com/linoytsaban/diffusers/refs/heads/dreambooth-lora-flux-exploration/examples/community/pipeline_flux_with_cfg.py | |
| # load pipeline | |
| import diffusers | |
| import torch | |
| from pipeline_flux_with_cfg import FluxCFGPipeline | |
| pipe = FluxCFGPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", | |
| torch_dtype=torch.bfloat16) |