jina-ai / dalle-flow

🌊 A Human-in-the-Loop workflow for creating HD images from text
grpcs://dalle-flow.dev.jina.ai
2.83k stars 209 forks source link

TypeError: 'NoneType' object is not subscriptable #100

Closed RHODOK closed 1 year ago

RHODOK commented 1 year ago

When running natively or using Docker container I receive the error as per traceback:

/dalle/glid-3-xl/dalle_flow_glid3/sample.py:19 in do_run                                                                                               
       │                                                                                                                                                        
       │    16 │   text_blank = blank_bert_embedding.repeat(runtime_args.batch_size, 1, 1)                                                                      
       │    17 │                                                                                                                                                
       │    18 │   # clip context                                                                                                                               
       │ ❱  19 │   text_emb_clip = np.repeat(text_emb_clip[np.newaxis, :], runtime_args.batch_size,                                                            
       │       axis=0)

text_emb_clip is not being populated, been trying to run pdb's in the native version but that seems to create a lot of issues on it's own.

It runs fine when glid-3 is disabled, but it then loses some of the power of the flow and mainly just results in me running stable diffusion.

This is running in WSL2 so possibly that may be creating issues, though it isn't clear to me at the moment how.

Will continue trying to debug, but thought it might be useful to know, especially in the case of docker failing.

delgermurun commented 1 year ago

Need to provide embedding from previous step. https://github.com/jina-ai/dalle-flow#step-2-select-and-refinement-via-glid3-xl

fav_id = 3
fav = da[fav_id]
fav.embedding = doc.embedding
fav.display()

fav.embedding = doc.embedding is important one.

RHODOK commented 1 year ago

This doesn't exist, the first model hit is the glid, i.e. this error occurs before that step on line:

doc = Document(text=prompt).post(server_url, parameters={'num_images': 8})
delgermurun commented 1 year ago

hmmm. Do you have clip_encoder executor before diffusion?

CryptoSoltan commented 1 year ago

hey I have the same error TypeError: 'NoneType' object is not subscribable how can I fix it My install version is updated but it can not interrogate the image or restore faces and it keep showing me this

JoanFM commented 1 year ago

Hey @CryptoSoltan,

Do you have clip encoder executor before diffusion?

CryptoSoltan commented 1 year ago

I don't even know what that means lol I did everything based on a tutorial on youtube Im not sure what's causing this problem on my computer

JoanFM commented 1 year ago

have u followed the instructions of the README?

CryptoSoltan commented 1 year ago

have u followed the instructions of the README?

I did I think its too complicated I can't find any solution to this subject I'm literally Confused

JoanFM commented 1 year ago

Can you provide a step-by-step description of what u have done that leads to this error?

CryptoSoltan commented 1 year ago

I have installed python(addpython.exe to the path has been checked) and git then I copied the git clone and install the stable diffusion 1.5 then I've downloaded the model from hugging face (changed the name to model after download and put it in the model folder . image

CryptoSoltan commented 1 year ago

basically I've followed this tutorial which is the lasted one https://www.youtube.com/watch?v=ycQJDJ-qNI8

CryptoSoltan commented 1 year ago

ive tried another one before and it didn't work too

CryptoSoltan commented 1 year ago

Can you provide a step-by-step description of what u have done that leads to this error?

do I have to install something for that to work?

CryptoSoltan commented 1 year ago

Can you provide a step-by-step description of what u have done that leads to this error?

after the installation everything thing seems to woking fine but the interrogate button keeps showing error image image

JoanFM commented 1 year ago

Hey @CryptoSoltan ,

you are using a project which is not the one of this repository, so there is nothing we can do to help you

CryptoSoltan commented 1 year ago

Also this doesn't work too image

CryptoSoltan commented 1 year ago

Hey @CryptoSoltan ,

you are using a project which is not the one of this repository, so there is nothing we can do to help you

oh I see thank you

JoanFM commented 1 year ago

I will close the error as there has not been interaction for long time. Feel free to open with more details if probelm encountered again