Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

570
Views
PyTorch RuntimeError: require_grad_ no es compatible con ScriptModules

Estoy ejecutando el código de Python desde un repositorio antiguo que parece que ya no funciona, pero no puedo entender por qué o cómo solucionarlo.

CÓDIGO DE CONFIGURACIÓN (Google Colab Notebook)

 #@title Setup import pkg_resources print(pkg_resources.get_distribution("torch").version) from IPython.utils import io with io.capture_output() as captured: !git clone https://github.com/openai/CLIP # !pip install taming-transformers !git clone https://github.com/CompVis/taming-transformers.git !rm -Rf clipit !git clone https://github.com/mfrashad/clipit.git !pip install ftfy regex tqdm omegaconf pytorch-lightning !pip install kornia !pip install imageio-ffmpeg !pip install einops !pip install torch-optimizer !pip install easydict !pip install braceexpand !pip install git+https://github.com/pvigier/perlin-numpy # ClipDraw deps !pip install svgwrite !pip install svgpathtools !pip install cssutils !pip install numba !pip install torch-tools !pip install visdom !pip install gradio !git clone https://github.com/BachiLi/diffvg %cd diffvg # !ls !git submodule update --init --recursive !python setup.py install %cd .. !mkdir -p steps !mkdir -p models import sys sys.path.append("clipit")

LUEGO ERRORES EN LA SEGUNDA A LA ÚLTIMA LÍNEA

 import clipit # To reset settings to default clipit.reset_settings() # You can use "|" to separate multiple prompts prompts = "underwater city" # You can trade off speed for quality: draft, normal, better, best quality = "normal" # Aspect ratio: widescreen, square aspect = "widescreen" # Add settings clipit.add_settings(prompts=prompts, quality=quality, aspect=aspect) # Apply these settings and run settings = clipit.apply_settings() clipit.do_init(settings) # generates error clipit.do_run(settings)

Trabajando con z de forma (1, 256, 16, 16) = 65536 dimensiones. pérdida de LPIPS preentrenada cargada de taming/modules/autoencoder/lpips/vgg.pth VQLPIPSWithDiscriminator ejecutándose con pérdida de bisagra. Restaurado desde models/vqgan_imagenet_f16_16384.ckpt ------------------------------------------- -------------------------------- RuntimeError Traceback (última llamada más reciente) en () 12 # Aplicar esta configuración y ejecutar 13 configuraciones = clipit.apply_settings() ---> 14 clipit.do_init(configuraciones) 15 clipit.do_run(configuraciones)

1 fotogramas /usr/local/lib/python3.7/dist-packages/torch/jit/_script.py in fail(self, *args, **kwargs) 912 def _make_fail(nombre): 913 def fail(self, * args, **kwargs): --> 914 aumentar RuntimeError(name + " no es compatible con ScriptModules") 915 916 return fail

RuntimeError: require_grad_ no es compatible con ScriptModules

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!