Spaces:
Running
on
Zero
Running
on
Zero
Update style_transfer.py
Browse files- style_transfer.py +6 -0
style_transfer.py
CHANGED
|
@@ -1,6 +1,12 @@
|
|
| 1 |
import torch
|
| 2 |
if not hasattr(torch, 'float8_e4m3fn'):
|
| 3 |
torch.float8_e4m3fn = torch.float32
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
from PIL import Image, ImageEnhance
|
| 6 |
import numpy as np
|
|
|
|
| 1 |
import torch
|
| 2 |
if not hasattr(torch, 'float8_e4m3fn'):
|
| 3 |
torch.float8_e4m3fn = torch.float32
|
| 4 |
+
|
| 5 |
+
try:
|
| 6 |
+
import huggingface_patch
|
| 7 |
+
print("huggingface_hub patch has been applied")
|
| 8 |
+
except ImportError:
|
| 9 |
+
print("Warning: Failed to import the huggingface_patch module")
|
| 10 |
|
| 11 |
from PIL import Image, ImageEnhance
|
| 12 |
import numpy as np
|