Instructions for Muse Traning

Is any guidelines how to trane it, for example, on some pixel art?

  1. What is main piplene? I just add some sprites to source, any prompts to associate it with results and start traning?

  2. How can i understand that process ended? Can i close traning window before traning ends?

  3. Why images with transparent background added with strange artifacts?

I used heroes 2 sprite just for test:

Sprites added to project with this settings:
image

Artifacts in set (added as Texture2d in Set Window):

Result:

Ive also trying just add raw pictures with (+) button.
It putted without artifacts (background are not transparent still)
image

In traning process got an error, but seems like proces not stopped:

IOException: Sharing violation on path D:\Work\Gamedev\Unity\Muse test\Library\Muse\StyleTrainer\StyleTrainerCache.db
System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) (at <787acc3c9a4c471ba7d971300105af24>:0)
System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.IO.FileOptions options) (at <787acc3c9a4c471ba7d971300105af24>:0)
(wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,System.IO.FileOptions)
LiteDB.Engine.FileStreamFactory.GetStream (System.Boolean canWrite, System.Boolean sequencial) (at <33c131de9dd64140bfb2be9ff6c2d0ca>:0)
LiteDB.Engine.StreamPool+<>c__DisplayClass3_0.<.ctor>b__0 () (at <33c131de9dd64140bfb2be9ff6c2d0ca>:0)
System.Lazy`1[T].ViaFactory (System.Threading.LazyThreadSafetyMode mode) (at <787acc3c9a4c471ba7d971300105af24>:0)
System.Lazy`1[T].ExecutionAndPublication (System.LazyHelper executionAndPublication, System.Boolean useDefaultConstructor) (at <787acc3c9a4c471ba7d971300105af24>:0)
System.Lazy`1[T].CreateValue () (at <787acc3c9a4c471ba7d971300105af24>:0)
System.Lazy`1[T].get_Value () (at <787acc3c9a4c471ba7d971300105af24>:0)
LiteDB.Engine.StreamPool.get_Writer () (at <33c131de9dd64140bfb2be9ff6c2d0ca>:0)
LiteDB.Engine.DiskService..ctor (LiteDB.Engine.EngineSettings settings, System.Int32[] memorySegmentSizes) (at <33c131de9dd64140bfb2be9ff6c2d0ca>:0)
LiteDB.Engine.LiteEngine..ctor (LiteDB.Engine.EngineSettings settings) (at <33c131de9dd64140bfb2be9ff6c2d0ca>:0)
LiteDB.ConnectionString.CreateEngine () (at <33c131de9dd64140bfb2be9ff6c2d0ca>:0)
LiteDB.LiteDatabase..ctor (LiteDB.ConnectionString connectionString, LiteDB.BsonMapper mapper) (at <33c131de9dd64140bfb2be9ff6c2d0ca>:0)
LiteDB.LiteDatabase..ctor (System.String connectionString, LiteDB.BsonMapper mapper) (at <33c131de9dd64140bfb2be9ff6c2d0ca>:0)
Unity.Muse.Common.Cache.LiteDbArtifactCache.InitDb () (at ./Library/PackageCache/com.unity.muse.common@0.3.0/Runtime/Artifacts/ArtifactCache/LiteDB/LiteDbArtifactCache.cs:39)
Unity.Muse.Common.Cache.LiteDbArtifactCache.get_db () (at ./Library/PackageCache/com.unity.muse.common@0.3.0/Runtime/Artifacts/ArtifactCache/LiteDB/LiteDbArtifactCache.cs:18)
Unity.Muse.Common.Cache.LiteDbArtifactCache.Clear () (at ./Library/PackageCache/com.unity.muse.common@0.3.0/Runtime/Artifacts/ArtifactCache/LiteDB/LiteDbArtifactCache.cs:63)
Unity.Muse.Common.Cache.LiteDbArtifactCache.DropCollection () (at ./Library/PackageCache/com.unity.muse.common@0.3.0/Runtime/Artifacts/ArtifactCache/LiteDB/LiteDbArtifactCache.cs:182)
Unity.Muse.Common.Cache.LiteDbArtifactCache.IsInCache (Unity.Muse.Common.Artifact artifact) (at ./Library/PackageCache/com.unity.muse.common@0.3.0/Runtime/Artifacts/ArtifactCache/LiteDB/LiteDbArtifactCache.cs:76)
Unity.Muse.StyleTrainer.StyleTrainerImageArtifactCache.WriteToCache (System.Byte[] value) (at ./Library/PackageCache/com.unity.muse.sprite@0.3.0/Runtime/StyleTrainer/Model/ImageArtifactCache.cs:75)
Unity.Muse.StyleTrainer.ImageArtifact.SetTexture (System.Byte[] texture) (at ./Library/PackageCache/com.unity.muse.sprite@0.3.0/Runtime/StyleTrainer/Model/ImageArtifact.cs:253)
Unity.Muse.StyleTrainer.ImageArtifact.LoadImageSuccess (System.Byte[] bytes) (at ./Library/PackageCache/com.unity.muse.sprite@0.3.0/Runtime/StyleTrainer/Model/ImageArtifact.cs:215)
Unity.Muse.StyleTrainer.ImageArtifact.OnGetImageFromURLSuccess (StyleTrainer.Backend.GetImageFromURLRestCall arg1, System.Byte[] arg2) (at ./Library/PackageCache/com.unity.muse.sprite@0.3.0/Runtime/StyleTrainer/Model/ImageArtifact.cs:185)
Unity.Muse.Sprite.Common.Backend.QuarkRestCall`3[TRequest,TResponse,TImplementorType].OnSuccess (TResponse response) (at ./Library/PackageCache/com.unity.muse.sprite@0.3.0/Runtime/Common/Backend/RestCall.cs:311)
Unity.Muse.Sprite.Common.Backend.QuarkRestCall`3[TRequest,TResponse,TImplementorType].OnRequestComplete (UnityEngine.Networking.UnityWebRequest r) (at ./Library/PackageCache/com.unity.muse.sprite@0.3.0/Runtime/Common/Backend/RestCall.cs:285)
UnityEngine.Debug:LogException(Exception)
Unity.Muse.Sprite.Common.Backend.QuarkRestCall`3:OnRequestComplete(UnityWebRequest) (at ./Library/PackageCache/com.unity.muse.sprite@0.3.0/Runtime/Common/Backend/RestCall.cs:290)
Unity.Muse.Sprite.Common.Backend.<>c__DisplayClass5_0:<SendRequest>b__0(AsyncOperation) (at ./Library/PackageCache/com.unity.muse.sprite@0.3.0/Runtime/Common/Backend/BackendUtilities.cs:64)
UnityEngine.AsyncOperation:InvokeCompletionEvent()

Final result:

Thank you for your questions, @Manveru, and also for these helpful screenshots!

That is correct. There are basically 2 main steps:

Input: You add in at least 5-15 images which you would like the style to train on.

Output: To prepare for the output preview, you also add in at least 3 Sample Prompts so that when the training is done, we’ll generate the Sample Outputs based on your Sample Prompts. This is to help you determine the success of the training. I.e. If the style was trained just right, undertrained, overtrained etc.

Here’s a more detailed guide for our Style Trainer.

Training is completed once you see that the Sample Outputs get generated. You may close the Style Trainer window or even the entire Editor half-way during training because it is training on the server and not locally on your machine.

This is not supposed to happen. It’s a bug which we are in the midst of looking into.

Let me bring this back to the team to have this checked out as well. Thanks!

Also would you be able to share how does your original wizard looks like outside of the Style Trainer or in an image previewer? I.e. without the artifacts. Would it just be the wizard without the white rectangle? Thanks!

image

It`s cuted on diferrent files original sprite map from heroes 2.

Layer 1
Layer 2
Layer 4
Layer 5

Thx for reply, ill try guide later.

Thank you for sharing your sprites!

I see what you mean now. When imported as the Sprite (2D and UI) texture type, they look like this in the Project window.

However, when dragged into the Style Trainer, we see some artifacts appearing.

When imported as the Default texture type, they look like this in the Project window and Style Trainer:

Thank you for flagging this. These issues are currently being looked into.

You are welcome :slight_smile: