Instructions to use tiny-random/Qwen-Image with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use tiny-random/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("tiny-random/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] - Notebooks
- Google Colab
- Kaggle
- Local Apps
- Draw Things
- DiffusionBee
Upload folder using huggingface_hub
Browse files
README.md
CHANGED
|
@@ -91,7 +91,7 @@ def init_weights(model):
|
|
| 91 |
torch.manual_seed(42)
|
| 92 |
with torch.no_grad():
|
| 93 |
for name, p in sorted(model.named_parameters()):
|
| 94 |
-
torch.nn.init.normal_(p, 0, 0.
|
| 95 |
print(name, p.shape, p.dtype, p.device)
|
| 96 |
|
| 97 |
with open(hf_hub_download(source_model_id, filename='text_encoder/config.json', repo_type='model'), 'r', encoding='utf - 8') as f:
|
|
|
|
| 91 |
torch.manual_seed(42)
|
| 92 |
with torch.no_grad():
|
| 93 |
for name, p in sorted(model.named_parameters()):
|
| 94 |
+
torch.nn.init.normal_(p, 0, 0.1)
|
| 95 |
print(name, p.shape, p.dtype, p.device)
|
| 96 |
|
| 97 |
with open(hf_hub_download(source_model_id, filename='text_encoder/config.json', repo_type='model'), 'r', encoding='utf - 8') as f:
|
text_encoder/model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 9934200
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c8ca2af0bd99def5b36cfad219e36735f61d7f53d9493660ab72ed9009160141
|
| 3 |
size 9934200
|
transformer/diffusion_pytorch_model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 193040
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:24cce553041c7a0fae196bcd85ab6c3f2116574bdd274b01e654435315c61dc8
|
| 3 |
size 193040
|
vae/diffusion_pytorch_model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 5171798
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:dadd08659a0b3e8f70e6d9b41b29f05a7e11b47dfb45e6bdf61bbe29d5a2fb87
|
| 3 |
size 5171798
|