Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,14 +3,14 @@ import numpy as np
|
|
| 3 |
import random
|
| 4 |
import spaces
|
| 5 |
import torch
|
| 6 |
-
from diffusers import
|
| 7 |
|
| 8 |
dtype = torch.bfloat16
|
| 9 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 10 |
|
| 11 |
|
| 12 |
# Load the model pipeline
|
| 13 |
-
pipe =
|
| 14 |
|
| 15 |
torch.cuda.empty_cache()
|
| 16 |
|
|
|
|
| 3 |
import random
|
| 4 |
import spaces
|
| 5 |
import torch
|
| 6 |
+
from diffusers import QwenImagePipeline
|
| 7 |
|
| 8 |
dtype = torch.bfloat16
|
| 9 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 10 |
|
| 11 |
|
| 12 |
# Load the model pipeline
|
| 13 |
+
pipe = QwenImagePipeline.from_pretrained("Qwen/Qwen-Image", torch_dtype=dtype).to(device)
|
| 14 |
|
| 15 |
torch.cuda.empty_cache()
|
| 16 |
|