Git Product home page Git Product logo

imagen-pytorch's People

Contributors

cene555 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

imagen-pytorch's Issues

colab failing on corrupt pth file?

restarted non pro colab runtime clean but error persists and fails at[16]?
face_enhancer = GFPGANer(
model_path='https://github.com/TencentARC/GFPGAN/releases/download/v1.3.0/GFPGANv1.3.pth',
upscale=4,
arch='clean',
channel_multiplier=2,
bg_upsampler=upsampler)


RuntimeError Traceback (most recent call last)
in ()
4 arch='clean',
5 channel_multiplier=2,
----> 6 bg_upsampler=upsampler)

2 frames
/usr/local/lib/python3.7/dist-packages/torch/serialization.py in _legacy_load(f, map_location, pickle_module, **pickle_load_args)
938 typed_storage._storage._set_from_file(
939 f, offset, f_should_read_directly,
--> 940 torch._utils._element_size(typed_storage.dtype))
941 if offset is not None:
942 offset = f.tell()

RuntimeError: unexpected EOF, expected 7441746 more bytes. The file might be corrupted.

Generation result

Generation result looks not so good...
For example:

prompt = 'monkey eat banana'

image

Maybe someone get better generation result?

"That model is a quick training in colab, don't expect good results"

#1

That model is a quick training in colab, don't expect good results

Maybe this could be made clearer in the README? @cene555

Otherwise, I think it just wastes people's time if all they're trying to get is something to use like dalle-mini (which is also limited, but arguably much better than the one linked in Colab), but at the expense of needing Colab Pro or similar.

What is the license for this code?

Thank you for publishing this great code.
I marvel at the excellence of this code and would love to use it.

What is the license for this code?

May I use it commercially, like the MIT licence?

evaluation on prompts

from celli:
i add this to the bottom of cene notebook for inference

https://gist.github.com/rom1504/b5db3c98c5485c0ec5a1d22d79ca083a

#benchmark
import random
import re
from shutil import copyfile

prompts2=[]
with open('/content/bench.txt') as my_file:
    prompts = my_file.readlines()

for q in prompts:
  q=q.strip()
  q=q.replace('\n', '')
  prompts2.append(q) 

prompts=prompts2
print(prompts[0])
for bench in prompts:
  prompt=bench
  text_encoding = tokenizer(
    prompt,
    max_length=128,
    padding="max_length",
    truncation=True,
    return_attention_mask=True,
    add_special_tokens=True,
    return_tensors="pt"
  )

  uncond_text_encoding = tokenizer(
      '',
      max_length=128,
      padding="max_length",
      truncation=True,
      return_attention_mask=True,
      add_special_tokens=True,
      return_tensors="pt"
  )
  model_kwargs = {}
  model_kwargs["tokens"] = th.cat((text_encoding['input_ids'],
                                  uncond_text_encoding['input_ids'])).to(device)
  model_kwargs["mask"] = th.cat((text_encoding['attention_mask'],
                                uncond_text_encoding['attention_mask'])).to(device)

  sample = diffusion.p_sample_loop(
      model_fn,
      (2, 3, 64, 64),
      clip_denoised=True,
      model_kwargs=model_kwargs,
      device='cuda',
      #progress=True,
  )[:1]
  print(prompt)
  show_images(sample)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.