Upload lovis93_next-scene-qwen-image-lora-2509_1.py with huggingface_hub
Browse files
lovis93_next-scene-qwen-image-lora-2509_1.py
CHANGED
|
@@ -11,16 +11,7 @@
|
|
| 11 |
# ///
|
| 12 |
|
| 13 |
try:
|
| 14 |
-
|
| 15 |
-
from diffusers.utils import load_image
|
| 16 |
-
|
| 17 |
-
pipe = DiffusionPipeline.from_pretrained("Qwen/Qwen-Image-Edit-2509")
|
| 18 |
-
pipe.load_lora_weights("lovis93/next-scene-qwen-image-lora-2509")
|
| 19 |
-
|
| 20 |
-
prompt = "Turn this cat into a dog"
|
| 21 |
-
input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png")
|
| 22 |
-
|
| 23 |
-
image = pipe(image=input_image, prompt=prompt).images[0]
|
| 24 |
with open('lovis93_next-scene-qwen-image-lora-2509_1.txt', 'w', encoding='utf-8') as f:
|
| 25 |
f.write('Everything was good in lovis93_next-scene-qwen-image-lora-2509_1.txt')
|
| 26 |
except Exception as e:
|
|
@@ -35,16 +26,7 @@ except Exception as e:
|
|
| 35 |
with open('lovis93_next-scene-qwen-image-lora-2509_1.txt', 'a', encoding='utf-8') as f:
|
| 36 |
import traceback
|
| 37 |
f.write('''```CODE:
|
| 38 |
-
|
| 39 |
-
from diffusers.utils import load_image
|
| 40 |
-
|
| 41 |
-
pipe = DiffusionPipeline.from_pretrained("Qwen/Qwen-Image-Edit-2509")
|
| 42 |
-
pipe.load_lora_weights("lovis93/next-scene-qwen-image-lora-2509")
|
| 43 |
-
|
| 44 |
-
prompt = "Turn this cat into a dog"
|
| 45 |
-
input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png")
|
| 46 |
-
|
| 47 |
-
image = pipe(image=input_image, prompt=prompt).images[0]
|
| 48 |
```
|
| 49 |
|
| 50 |
ERROR:
|
|
|
|
| 11 |
# ///
|
| 12 |
|
| 13 |
try:
|
| 14 |
+
pip install -U diffusers transformers
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
with open('lovis93_next-scene-qwen-image-lora-2509_1.txt', 'w', encoding='utf-8') as f:
|
| 16 |
f.write('Everything was good in lovis93_next-scene-qwen-image-lora-2509_1.txt')
|
| 17 |
except Exception as e:
|
|
|
|
| 26 |
with open('lovis93_next-scene-qwen-image-lora-2509_1.txt', 'a', encoding='utf-8') as f:
|
| 27 |
import traceback
|
| 28 |
f.write('''```CODE:
|
| 29 |
+
pip install -U diffusers transformers
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
```
|
| 31 |
|
| 32 |
ERROR:
|