Code Monkey home page Code Monkey logo

Comments (16)

1390806607 avatar 1390806607 commented on June 8, 2024

Hello, I have the same problem. Have you solved it

from dalle2-pytorch.

lucidrains avatar lucidrains commented on June 8, 2024

@1390806607 could you retry with 1.15.3? also share your error if it still emits one

from dalle2-pytorch.

1390806607 avatar 1390806607 commented on June 8, 2024

thank you

from dalle2-pytorch.

1390806607 avatar 1390806607 commented on June 8, 2024

The code I used is 1.15.3

from dalle2-pytorch.

lucidrains avatar lucidrains commented on June 8, 2024

@1390806607 could you paste your error?

from dalle2-pytorch.

1390806607 avatar 1390806607 commented on June 8, 2024

image

from dalle2-pytorch.

lucidrains avatar lucidrains commented on June 8, 2024

@1390806607 try 1.15.5?

from dalle2-pytorch.

1390806607 avatar 1390806607 commented on June 8, 2024

Let me try. Is there a big difference between the two versions of code

from dalle2-pytorch.

1390806607 avatar 1390806607 commented on June 8, 2024

{
"decoder": {
"unets": [
{
"dim": 128,
"image_embed_dim": 768,
"cond_dim": 64,
"channels": 3,
"dim_mults": [1, 2, 4, 8],
"attn_dim_head": 32,
"attn_heads": 16
}
],
"image_sizes": [64],
"channels": 3,
"timesteps": 1000,
"loss_type": "l2",
"beta_schedule": ["cosine"],
"learned_variance": true
},
"data": {
"webdataset_base_url": "E:/company_wy/DALLE2-pytorch-1.15.5/mscoco/00000.tar",
"img_embeddings_url": "E:/company_wy/DALLE2-pytorch-1.15.5/embeddings/img_emb",
"num_workers": 4,
"batch_size": 64,
"start_shard": 0,
"end_shard": 9999999,
"shard_width": 6,
"index_width": 4,
"splits": {
"train": 0.75,
"val": 0.15,
"test": 0.1
},
"shuffle_train": true,
"resample_train": false,
"preprocessing": {
"RandomResizedCrop": {
"size": [128, 128],
"scale": [0.75, 1.0],
"ratio": [1.0, 1.0]
},
"ToTensor": true
}
},
"train": {
"epochs": 20,
"lr": 1e-4,
"wd": 0.01,
"max_grad_norm": 0.5,
"save_every_n_samples": 100000,
"n_sample_images": 6,
"device": "cuda:0",
"epoch_samples": null,
"validation_samples": null,
"use_ema": true,
"ema_beta": 0.99,
"amp": false,
"unet_training_mask": [true]
},
"evaluate": {
"n_evaluation_samples": 1000,
"FID": {
"feature": 64
},
"IS": {
"feature": 64,
"splits": 10
},
"KID": {
"feature": 64,
"subset_size": 10
},
"LPIPS": {
"net_type": "vgg",
"reduction": "mean"
}
},
"tracker": {
"overwrite_data_path": true,

    "log": {
        "log_type": "wandb",

        "wandb_entity": "c9117a62c11b6824fa20ef073761b14d2aa814b9",
        "wandb_project": "decoder_train",

        "verbose": true
    },

    "load": {
        "load_from": null
    },

    "save": [{
        "save_to": "wandb",
        "save_latest_to": "latest.pth"
    }, {


        "save_latest_to": "./decoder_model/latest.pth",
        "save_best_to": "./decoder_model/best.pth",
        "save_meta_to": "./decoder_model/assorted/files",

        "save_type": "model"
    }]
}

}

My parameter

python train_decoder.py errors

{'decoder': {'unets': [{'dim': 128, 'image_embed_dim': 768, 'cond_dim': 64, 'channels': 3, 'dim_mults': [1, 2, 4, 8], 'attn_dim_head': 32, 'attn_heads': 16}], 'image_sizes': [64], 'channels': 3, 'timesteps': 1000, 'loss_type': 'l2', 'beta_schedule': ['cosine'], 'learned_variance': True}, 'data': {'webdataset_base_url': 'E:/company_wy/DALLE2-pytorch-1.15.5/mscoco/00000.tar', 'img_embeddings_url': 'E:/company_wy/DALLE2-pytorch-1.15.5/embeddings/img_emb', 'num_workers': 4, 'batch_size': 64, 'start_shard': 0, 'end_shard': 9999999, 'shard_width': 6, 'index_width': 4, 'splits': {'train': 0.75, 'val': 0.15, 'test': 0.1}, 'shuffle_train': True, 'resample_train': False, 'preprocessing': {'RandomResizedCrop': {'size': [128, 128], 'scale': [0.75, 1.0], 'ratio': [1.0, 1.0]}, 'ToTensor': True}}, 'train': {'epochs': 20, 'lr': 0.0001, 'wd': 0.01, 'max_grad_norm': 0.5, 'save_every_n_samples': 100000, 'n_sample_images': 6, 'device': 'cuda:0', 'epoch_samples': None, 'validation_samples': None, 'use_ema': True, 'ema_beta': 0.99, 'amp': False, 'unet_training_mask': [True]}, 'evaluate': {'n_evaluation_samples': 1000, 'FID': {'feature': 64}, 'IS': {'feature': 64, 'splits': 10}, 'KID': {'feature': 64, 'subset_size': 10}, 'LPIPS': {'net_type': 'vgg', 'reduction': 'mean'}}, 'tracker': {'overwrite_data_path': True, 'log': {'log_type': 'wandb', 'wandb_entity': 'c9117a62c11b6824fa20ef073761b14d2aa814b9', 'wandb_project': 'decoder_train', 'verbose': True}, 'load': {'load_from': None}, 'save': [{'save_to': 'wandb', 'save_latest_to': 'latest.pth'}, {'save_latest_to': './decoder_model/latest.pth', 'save_best_to': './decoder_model/best.pth', 'save_meta_to': './decoder_model/assorted/files', 'save_type': 'model'}]}}
Traceback (most recent call last):
File "E:\company_wy\DALLE2-pytorch-1.15.5\train_decoder.py", line 651, in
main()
File "E:\anaconda\envs\dalle\lib\site-packages\click\core.py", line 1157, in call
return self.main(*args, **kwargs)
File "E:\anaconda\envs\dalle\lib\site-packages\click\core.py", line 1078, in main
rv = self.invoke(ctx)
File "E:\anaconda\envs\dalle\lib\site-packages\click\core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "E:\anaconda\envs\dalle\lib\site-packages\click\core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "E:\company_wy\DALLE2-pytorch-1.15.5\train_decoder.py", line 647, in main
config = TrainDecoderConfig.from_json_path(str(config_file_path))
File "E:\company_wy\DALLE2-pytorch-1.15.5\dalle2_pytorch\train_configs.py", line 351, in from_json_path
return cls(**config)
File "E:\anaconda\envs\dalle\lib\site-packages\pydantic\main.py", line 164, in init
pydantic_self.pydantic_validator.validate_python(data, self_instance=pydantic_self)
pydantic_core._pydantic_core.ValidationError: 2 validation errors for TrainDecoderConfig
decoder.unets.list[UnetConfig].0.self_attn
Field required [type=missing, input_value={'dim': 128, 'image_embed...': 32, 'attn_heads': 16}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.4/v/missing
decoder.unets.tuple[...].0.self_attn
Field required [type=missing, input_value={'dim': 128, 'image_embed...': 32, 'attn_heads': 16}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.4/v/missing

Process finished with exit code 1
@lucidrains Hello, can you take a look for me

from dalle2-pytorch.

1390806607 avatar 1390806607 commented on June 8, 2024

I added "self_attn" to unet in train_decoder_config.example.json :[false,true,true,true] The above problem was solved, but I ran into a new problem, It's a little long in generating example data.

image
@lucidrains

from dalle2-pytorch.

lucidrains avatar lucidrains commented on June 8, 2024

@1390806607 1.15.6?

from dalle2-pytorch.

lucidrains avatar lucidrains commented on June 8, 2024

@1390806607 ah, make this change, or update to latest with a git pull

from dalle2-pytorch.

1390806607 avatar 1390806607 commented on June 8, 2024

1.15.5, 1.15.6 I'll try it

from dalle2-pytorch.

1390806607 avatar 1390806607 commented on June 8, 2024

@lucidrains Is this normal
image

from dalle2-pytorch.

lucidrains avatar lucidrains commented on June 8, 2024

@1390806607 nope, not normal

try updating yet again

from dalle2-pytorch.

1390806607 avatar 1390806607 commented on June 8, 2024

@lucidrains I'll pull it up using git pull, I still look like this after running again. How can I solve this problem
image

from dalle2-pytorch.

Related Issues (20)

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.