Instructions to use linyq/kiwi-edit-5b-reference-only-diffusers with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use linyq/kiwi-edit-5b-reference-only-diffusers with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image, export_to_video # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("linyq/kiwi-edit-5b-reference-only-diffusers", dtype=torch.bfloat16, device_map="cuda") pipe.to("cuda") prompt = "A man with short gray hair plays a red electric guitar." image = load_image( "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/guitar-man.png" ) output = pipe(image=image, prompt=prompt).frames[0] export_to_video(output, "output.mp4") - Notebooks
- Google Colab
- Kaggle
| { | |
| "crop_size": null, | |
| "data_format": "channels_first", | |
| "default_to_square": true, | |
| "device": null, | |
| "disable_grouping": null, | |
| "do_center_crop": null, | |
| "do_convert_rgb": true, | |
| "do_normalize": true, | |
| "do_pad": null, | |
| "do_rescale": true, | |
| "do_resize": true, | |
| "image_mean": [ | |
| 0.48145466, | |
| 0.4578275, | |
| 0.40821073 | |
| ], | |
| "image_processor_type": "Qwen2VLImageProcessorFast", | |
| "image_std": [ | |
| 0.26862954, | |
| 0.26130258, | |
| 0.27577711 | |
| ], | |
| "input_data_format": null, | |
| "max_pixels": 12845056, | |
| "merge_size": 2, | |
| "min_pixels": 3136, | |
| "pad_size": null, | |
| "patch_size": 14, | |
| "processor_class": "Qwen2_5_VLProcessor", | |
| "resample": 3, | |
| "rescale_factor": 0.00392156862745098, | |
| "return_tensors": null, | |
| "size": { | |
| "longest_edge": 12845056, | |
| "shortest_edge": 3136 | |
| }, | |
| "temporal_patch_size": 2 | |
| } | |