Instructions to use Qwen/Qwen-Image with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Qwen/Qwen-Image with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("Qwen/Qwen-Image", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- Draw Things
- DiffusionBee
Update Postive_magic as a dict from list
#8
by voidcoder - opened
Postive_magic is a dict with en/cn mapping to prompt enhancement. It was written as a list causing syntax errors.
came to do the same! 👏
positive_magic = [
"en": "Ultra HD, 4K, cinematic composition." # for english prompt,
"zh": "超清,4K,电影级构图" # for chinese prompt,
]
Needs to be:
positive_magic = {
"en": "Ultra HD, 4K, cinematic composition.", # <-- please note the comma before the hash, it's also needed for the dict. for english prompt,
"zh": "超清,4K,电影级构图" # for chinese prompt,
}
How to update the commit changes? HF UI is not so untuititve.
Created another PR https://huggingface.co/Qwen/Qwen-Image/discussions/36