Upload tlennon-ie_qwen-edit-skin_0.py with huggingface_hub
Browse files
tlennon-ie_qwen-edit-skin_0.py
CHANGED
|
@@ -4,6 +4,8 @@
|
|
| 4 |
# "numpy",
|
| 5 |
# "einops",
|
| 6 |
# "pandas",
|
|
|
|
|
|
|
| 7 |
# "protobuf",
|
| 8 |
# "torch",
|
| 9 |
# "sentencepiece",
|
|
@@ -19,9 +21,11 @@
|
|
| 19 |
# ///
|
| 20 |
|
| 21 |
try:
|
|
|
|
| 22 |
from diffusers import DiffusionPipeline
|
| 23 |
|
| 24 |
-
|
|
|
|
| 25 |
pipe.load_lora_weights("tlennon-ie/qwen-edit-skin")
|
| 26 |
|
| 27 |
prompt = "make the subjects skin details more prominent and natural"
|
|
@@ -40,9 +44,11 @@ except Exception as e:
|
|
| 40 |
with open('tlennon-ie_qwen-edit-skin_0.txt', 'a', encoding='utf-8') as f:
|
| 41 |
import traceback
|
| 42 |
f.write('''```CODE:
|
|
|
|
| 43 |
from diffusers import DiffusionPipeline
|
| 44 |
|
| 45 |
-
|
|
|
|
| 46 |
pipe.load_lora_weights("tlennon-ie/qwen-edit-skin")
|
| 47 |
|
| 48 |
prompt = "make the subjects skin details more prominent and natural"
|
|
|
|
| 4 |
# "numpy",
|
| 5 |
# "einops",
|
| 6 |
# "pandas",
|
| 7 |
+
# "matplotlib",
|
| 8 |
+
# "paddleorc",
|
| 9 |
# "protobuf",
|
| 10 |
# "torch",
|
| 11 |
# "sentencepiece",
|
|
|
|
| 21 |
# ///
|
| 22 |
|
| 23 |
try:
|
| 24 |
+
import torch
|
| 25 |
from diffusers import DiffusionPipeline
|
| 26 |
|
| 27 |
+
# switch to "mps" for apple devices
|
| 28 |
+
pipe = DiffusionPipeline.from_pretrained("Qwen/Qwen-Image-Edit-2509", dtype=torch.bfloat16, device_map="cuda")
|
| 29 |
pipe.load_lora_weights("tlennon-ie/qwen-edit-skin")
|
| 30 |
|
| 31 |
prompt = "make the subjects skin details more prominent and natural"
|
|
|
|
| 44 |
with open('tlennon-ie_qwen-edit-skin_0.txt', 'a', encoding='utf-8') as f:
|
| 45 |
import traceback
|
| 46 |
f.write('''```CODE:
|
| 47 |
+
import torch
|
| 48 |
from diffusers import DiffusionPipeline
|
| 49 |
|
| 50 |
+
# switch to "mps" for apple devices
|
| 51 |
+
pipe = DiffusionPipeline.from_pretrained("Qwen/Qwen-Image-Edit-2509", dtype=torch.bfloat16, device_map="cuda")
|
| 52 |
pipe.load_lora_weights("tlennon-ie/qwen-edit-skin")
|
| 53 |
|
| 54 |
prompt = "make the subjects skin details more prominent and natural"
|