ERROR cannot import name contextualloss from losses.contextual_loss on windows anaconda python 3.7
Opened this issue · 3 comments
how to fix this to runlocal? colab is broken with non public drive links
error says unknown location
joint_loss.py , line 21 in module
@2blackbar Did you find any fix? I got similar error too :(
++ spectral_sensitivity=g
++ path=/mnt/95d2aa3d-99e9-4600-91b1-2fcecff0dec5/AI_Tools/Time-Travel-Rephotography.github.io/example/out/Bal_Gangadhar_Tilak_01.png
++ blur_radius=0.7
+++ dirname /mnt/95d2aa3d-99e9-4600-91b1-2fcecff0dec5/AI_Tools/Time-Travel-Rephotography.github.io/example/out/Bal_Gangadhar_Tilak_01.png
++ list=/mnt/95d2aa3d-99e9-4600-91b1-2fcecff0dec5/AI_Tools/Time-Travel-Rephotography.github.io/example/out
+++ basename /mnt/95d2aa3d-99e9-4600-91b1-2fcecff0dec5/AI_Tools/Time-Travel-Rephotography.github.io/example/out
++ list=out
++ '[' g == b ']'
++ '[' g == gb ']'
++ FLAGS=(--spectral_sensitivity "g" --encoder_ckpt checkpoint/encoder/checkpoint_g.pt)
++ name=/mnt/95d2aa3d-99e9-4600-91b1-2fcecff0dec5/AI_Tools/Time-Travel-Rephotography.github.io/example/out/Bal_Gangadhar_Tilak_01
++ name=Bal_Gangadhar_Tilak_01
++ echo Bal_Gangadhar_Tilak_01
Bal_Gangadhar_Tilak_01
++ python projector.py /mnt/95d2aa3d-99e9-4600-91b1-2fcecff0dec5/AI_Tools/Time-Travel-Rephotography.github.io/example/out/Bal_Gangadhar_Tilak_01.png --gaussian 0.7 --log_dir log/ --results_dir results/ --spectral_sensitivity g --encoder_ckpt checkpoint/encoder/checkpoint_g.pt
Traceback (most recent call last):
File "projector.py", line 24, in <module>
from losses.joint_loss import JointLoss
File "/mnt/95d2aa3d-99e9-4600-91b1-2fcecff0dec5/AI_Tools/Time-Travel-Rephotography.github.io/losses/joint_loss.py", line 21, in <module>
from .contextual_loss import ContextualLoss
ImportError: cannot import name 'ContextualLoss' from 'losses.contextual_loss' (unknown location)
real 0m0.427s
user 0m0.374s
sys 0m0.033s
No but when i ran it in collab it took AGES to build lincoln also he did not look similar to himself cause its just upscaled real srgan approximation , not a real colorisation, the best colorisation is gpen but your face needs to be in the middle, nose in the middle of the frame and jaw almost touching bottom, 1024x1024, i recommend it. IT also runs qiuite fast when you run it from anaconda enviroment , theres windows gpen available but its much slower i think but easier to install than anaconda one.
Your missing the libary in /losses/contextual_loss
and put into /losses/contextual_loss