Project 2: Images Created Using the ComfyGUI Interface

glegrady
Posts: 232
Joined: Wed Sep 22, 2010 12:26 pm

Re: Style Transfer studies

Post by glegrady » Mon Feb 09, 2026 1:57 pm

MOTIVATION: Testing the variables in the Neural Style Transfer NODE

METHODS: One image controls the style (what the image looks like) the other is connected to the content (form / shape). Each can be set between 1000 to 100000. I tried to go beyond but these seem to be the limit.

Looking at the NeuralStyleTransfer node in the workflow, it has 5 widget values/settings:
json"widgets_values": [
100000, // Setting 1
30000, // Setting 2
1, // Setting 3
100, // Setting 4
1 // Setting 5
]
Based on typical neural style transfer implementations, these settings likely control:

Content Weight (100000): Controls how much the output should preserve the original content image structure. Higher values = more faithful to the original content image.
Style Weight (30000): Controls how strongly the style should be applied. Higher values = more aggressive style transfer from the style image.
Total Variation Weight (1): Smoothness/denoising parameter. Helps reduce noise and create smoother transitions. Higher values = smoother but potentially less detailed output - I am using 0 to keep the full texture of the content image (the black and white branches)
Number of Steps/Iterations (100): How many optimization iterations to run. More steps = better quality but slower processing.
Learning_rate : The learning rate determines the step size for each iteration when the algorithm is trying to blend your content and style images:

Higher learning rate (e.g., 0.1, 1.0):

Faster convergence
Larger changes per iteration
Risk of overshooting and creating unstable/poor results
May miss the optimal solution

Lower learning rate (e.g., 0.001, 0.01):

Slower, more careful optimization
Smaller, incremental changes
More stable results
Takes more iterations to reach good results
Better fine-tuning

Why it matters: Neural style transfer works by starting with an image (often the content image or random noise) and gradually adjusting it to:

Match the content of your content image
Match the style of your style image
StyleTransfer_00019_.png
StyleTransfer_00017_.png
StyleTransfer_00014_.png
StyleTransfer_00013_.png
StyleTransfer_00012_.png
StyleTransfer_00011_.png
StyleTransfer_00010_.png
StyleTransfer_00008_.png
Screenshot 2026-02-09 at 2.35.09 PM.png
Screenshot 2026-02-09 at 2.14.00 PM.png
Screenshot 2026-02-09 at 1.46.01 PM.png
Screenshot 2026-02-09 at 1.38.04 PM.png
StyleTransfer_00019_.png
StyleTransfer_00017_.png
George Legrady
legrady@mat.ucsb.edu

Post Reply