Instructions to use hf-internal-testing/tiny-qwenimage-edit-modular with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use hf-internal-testing/tiny-qwenimage-edit-modular with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("hf-internal-testing/tiny-qwenimage-edit-modular", 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
File size: 2,224 Bytes
fadec0f d7d108c fadec0f c600e5f fadec0f d7d108c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | {
"_blocks_class_name": "QwenImageEditAutoBlocks",
"_class_name": "QwenImageEditModularPipeline",
"_diffusers_version": "0.36.0.dev0",
"processor": [
"transformers",
"Qwen2VLProcessor",
{
"repo": "hf-internal-testing/tiny-qwenimage-edit-pipe",
"revision": null,
"subfolder": "processor",
"type_hint": [
"transformers",
"Qwen2VLProcessor"
],
"variant": null
}
],
"prompt_template_encode": "<|im_start|>system\nDescribe the key features of the input image (color, shape, size, texture, objects, background), then explain how the user's text instruction should alter or modify the image. Generate a new image that meets the user's requirements while maintaining consistency with the original input where appropriate.<|im_end|>\n<|im_start|>user\n<|vision_start|><|image_pad|><|vision_end|>{}<|im_end|>\n<|im_start|>assistant\n",
"prompt_template_encode_start_idx": 64,
"scheduler": [
"diffusers",
"FlowMatchEulerDiscreteScheduler",
{
"repo": "hf-internal-testing/tiny-qwenimage-edit-pipe",
"revision": null,
"subfolder": "scheduler",
"type_hint": [
"diffusers",
"FlowMatchEulerDiscreteScheduler"
],
"variant": null
}
],
"text_encoder": [
"transformers",
"Qwen2_5_VLForConditionalGeneration",
{
"repo": "hf-internal-testing/tiny-qwenimage-edit-pipe",
"revision": null,
"subfolder": "text_encoder",
"type_hint": [
"transformers",
"Qwen2_5_VLForConditionalGeneration"
],
"variant": null
}
],
"transformer": [
"diffusers",
"QwenImageTransformer2DModel",
{
"repo": "hf-internal-testing/tiny-qwenimage-edit-pipe",
"revision": null,
"subfolder": "transformer",
"type_hint": [
"diffusers",
"QwenImageTransformer2DModel"
],
"variant": null
}
],
"vae": [
"diffusers",
"AutoencoderKLQwenImage",
{
"repo": "hf-internal-testing/tiny-qwenimage-edit-pipe",
"revision": null,
"subfolder": "vae",
"type_hint": [
"diffusers",
"AutoencoderKLQwenImage"
],
"variant": null
}
]
} |