question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Typo for text_encodings?

See original GitHub issue

Hi, me again (lol)

Just curious why set inited text_encodings’s length as 0 https://github.com/lucidrains/DALLE2-pytorch/blob/8b054686530c90ecd8e8db62eb9c648d189accf9/dalle2_pytorch/dalle2_pytorch.py#L747-L748

I tried the test code in the Readme, but throw an error

concated token’s shape: (b 4 d), :[text_encoding(b,0,d), text_embed(b,1,d), time_embed(b,1,d), image_embed(b,1,d), learned_queries(b,1,d)] mask’s shape: (b 5)).

diffusion_prior = DiffusionPrior(
    net = prior_network,
    clip = clip,
    timesteps = 100,
    cond_drop_prob = 0.2,
    condition_on_text_encodings = False  # this probably should be true, but just to get Laion started
).cuda()

But, when I write as text_encodings = torch.empty((batch, 1, dim), device = device, dtype = dtype) , error gone.

Plz have a check. Enjoy!

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
CiaoHecommented, May 7, 2022

Yeah, weird, the latest version is cool. My wrong haha (let me check it)

I set the mask wrong mask = torch.ones((batch, text_encodings.shape[-2]), device=device, dtype=torch.bool) (text_encodings.shape[-2], I wrote as text_embeds.shape[-2])

1reaction
CiaoHecommented, May 7, 2022

@CiaoHe wow, you retyped all ~2k lines of code? 🤯

Sounds really funny haha. But I think it better to check than just fork the whole down

Read more comments on GitHub >

github_iconTop Results From Across the Web

Character encodings for beginners
A font is a collection of glyph definitions, ie. definitions of the shapes used to display characters. Once your browser or app has...
Read more >
Codec registry and base classes
Most standard codecs are text encodings, which encode text to bytes (and ... Refer to Codec Base Classes for more information on codec...
Read more >
Method not found System.Text.Encodings.Web. ...
It's exactly the same error as the ones linked from xamarin/xamarin-macios#10928. I do have a repro app, several of them in fact. 👍...
Read more >
III-16 Text Encodings
Formatted Text Notebook File Text Encodings . ... LoadWave Text Encodings for Igor Binary Wave Files . ... String Variable Text Encoding Error...
Read more >
TextEncoding Property - Business Central
Specifies the text encoding format to use when you use an XmlPort to export or import data as text.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found