ImageReward fix, #214
parent
b2f6e4cbe5
commit
9229ed5e7e
10
install.py
10
install.py
|
|
@ -4,6 +4,14 @@ import os
|
|||
if not launch.is_installed("send2trash"):
|
||||
launch.run_pip("install Send2Trash", "Send2Trash requirement for image browser")
|
||||
|
||||
if not launch.is_installed("ImageReward"):
|
||||
try:
|
||||
import ImageReward
|
||||
import dataset
|
||||
import dill
|
||||
import diffusers
|
||||
import multiprocessing
|
||||
import pyarrow
|
||||
import xxhash
|
||||
except ImportError as e:
|
||||
req_IR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "req_IR.txt")
|
||||
launch.run_pip(f'install -r "{req_IR}" --no-deps image-reward', 'ImageReward requirement for image browser')
|
||||
|
|
|
|||
|
|
@ -1 +1,7 @@
|
|||
datasets
|
||||
diffusers
|
||||
dill
|
||||
fairscale
|
||||
multiprocess
|
||||
pyarrow
|
||||
xxhash
|
||||
|
|
|
|||
|
|
@ -48,8 +48,9 @@ except ImportError:
|
|||
try:
|
||||
import ImageReward
|
||||
image_reward_installed = True
|
||||
except ImportError:
|
||||
except ImportError as e:
|
||||
print("Image Browser: ImageReward is not installed, cannot be used.")
|
||||
print(e)
|
||||
image_reward_installed = False
|
||||
|
||||
# Force reload wib_db, as it doesn't get reloaded otherwise, if an extension update is started from webui
|
||||
|
|
|
|||
Loading…
Reference in New Issue