Open norasyeezys opened 2 years ago
Same issue, been trying to figure it out
Also been trying to hammer this one out. Everytime I change the Edition Size beyond 11, it throws this error. It does 11 and less, for me at least, without issue.
I think I figured it out. Go to config.js Then to line 129: const editionSize = 10; Change the number to the total number of NFT's you want to generate.
Then make sure to adjust your rarities. You can do this starting on line 135 and ending on line 138: let rarityWeights = [ addRarity('super_rare', 1, 1), addRarity('rare', 2, 5), addRarity('original', 5, 10)
Adjust the numbers so the rarities match the total number of NFT's you want to create.
Let me know if this helps. I was running the code and it would only create 10 editions. After doing some digging I figured it out and was able to do 15 editions without an error.
I think I figured it out. Go to config.js Then to line 129: const editionSize = 10; Change the number to the total number of NFT's you want to generate.
Then make sure to adjust your rarities. You can do this starting on line 135 and ending on line 138: let rarityWeights = [ addRarity('super_rare', 1, 1), addRarity('rare', 2, 5), addRarity('original', 5, 10)
Adjust the numbers so the rarities match the total number of NFT's you want to create.
Let me know if this helps. I was running the code and it would only create 10 editions. After doing some digging I figured it out and was able to do 15 editions without an error.
After playing with numbers, I got it to work for a bit, and then it gave me an infinite loop.
@WalkingEclipse indeed that's the way to go.
The second and third parameters are from and to. Meaning the length of range that rarity should be applied. And the provided range lengths must match the value of editionSize
set in the config otherwise will throw an error while generating the outputs.
For example;
const editionSize = 100;
let rarityWeights = [
addRarity('super_rare', 1, 10),
addRarity('rare', 10, 40),
addRarity('original', 40, 100)
];
from 1 to 10 will be super rare – 10 images from 10 to 40 will be rare – 30 images from 40 to 100 will be original – 60 images
Maybe another detail: by changing the order of addRarity
you can control if the first x to y is a certain rarity. Mind that it is inverted though. In the above example the last 10 images will be super_rare in the output folder.
how i remove numbers from the final image? also how i surpass infinite loop?
I changed editionSize from 10 to 20, and I got this error. It works fine with 10.
##################
Generative Art
- Create your NFT collection
##################
start creating NFTs.
creating NFT 1 of 20
TypeError: Cannot read properties of undefined (reading 'length') at C:[%directory]\generative-art-opensource-main\index.js:133:77 at Array.forEach ()
at createDna (C:[%directory]\generative-art-opensource-main\index.js:132:11)
at startCreating (C:[%directory]\generative-art-opensource-main\index.js:200:18)
at Object. (C:[%directory]\generative-art-opensource-main\index.js:249:1)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:79:12)